Skip to content

Use localized pluralization for sidebar heading counts #5

Description

@productengineered

Source

CodeRabbit finding #9 from PR #2.

What

The markdown sidebar footer uses a ternary for pluralization:
`total == 1 ? "heading" : "headings"`

This doesn't support languages with complex plural rules (e.g., Russian has 3 plural forms, Arabic has 6).

Why deferred

The existing JSONL sidebar uses the exact same ternary pattern for "line"/"lines". Fixing one without the other would be inconsistent. This should be addressed as a single pass across all sidebar footers when localization becomes a priority.

When to revisit

When adding localization support to the app (String Catalogs / stringsdict).

Files

  • app/Parsely/Parsely/Views/Screens/MarkdownSidebarView.swift (lines 125-127)
  • app/Parsely/Parsely/Views/Screens/SidebarView.swift (lines 117-123) — same pattern

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions