AFinity icon indicating copy to clipboard operation
AFinity copied to clipboard

[Localization] Plurals and some non-localized values

Open arsenii-mitianin opened this issue 3 months ago • 0 comments

Problem description

Hi!

I've just wanted to consolidate several things I've noticed when testing out AFinity Nightly. Currently I've found 3 things in terms of localization that could benefit from these enhancements.

String plurals

I've noticed that in some of the recent updates AFinity started supporting proper pluralization for some strings. There are others that will also benefit from this: currently they can have single/plural duplicates that could be removed, and there are some strings that don't change regardless of the number value.

Date format strings

Some date formats are not localized, for example in custom_sections_preset_range_fmt (haven't noticed any others, tbh). Taking Halloween as an example, in Russian it's currently showing values like "окт. 31", which matches the "Oct 31" format. In Russian short dates are usually displayed as either "31 окт." or "31.10".

Non-localized values

Some values in several places of the app can't be localized. So far, I've managed to find these:

  • Home screen: Section labels in the Bottom Bar / Side navigation menu

    Bottom bar Side menu
  • Settings > Downloads & Storage: Storage amount units

    Image
  • Settings > Custom Home Sections > Add section (tap "+"): Names for seasonal presets (Halloween, Christmas, etc.)

  • Settings > Custom Home Sections > New/Edit section dialog: Values for "Source type", "Card Style", "Sort"

    Image
  • Settings > Playback:

    • Video Buffer Size: Units

      Image
    • ExoPlayer Settings: All values for ASS subtitle rendering

    • MPV Settings: "Disabled" value for Hardware decoding

    • Max bitrate for Chromecast

Proposed solution

String plurals

It seems that Weblate can automatically pick appropriate plural forms for a specific language when doing translations. For Russian it did correctly pick forms for one, few, and many.

I've taken some time to browse through available strings on Weblate, and I think it would make sense to use plural forms for these strings:

 - hero_season_plural
 - meta_boxset_count
 - meta_parts_fmt
 - meta_episode_count
 - livetv_count_fmt
 - person_born_fmt (for person's age)
 - person_died_fmt (same as `person_born_fmt`)
 - playback_stats_value_seconds_fmt
 - search_results_count_fmt
 - download_plural (has a duplicate `download_singular`, no need for `download_count_fmt`)
 - user_plural (has a duplicate `user_singular`, no need for `user_count_fmt`)
 - dialog_delete_server_warning_fmt
 - quota_days_fmt
 - request_quota_movie_remaining_fmt (maybe, possible to have 1 of 1 available request, you never know)
 - request_quota_tv_remaining_fmt (same as `request_quota_movie_remaining_fmt`)
 - request_quota_period_fmt
 - season_count_fmt
 - server_more_users_plural_fmt (has a duplicate `server_more_users_fmt`)
 - server_backup_routes_fmt
 - discovery_count_label
 - backup_section_home_fmt
 - backup_section_settings_fmt
 - pref_clear_cache_usage_fmt
 - pref_clear_cache_usage_total_fmt
 - cache_entries_fmt
 - custom_sections_refine_summary_fmt
 - directors_prefix (could be "Director:"/"Directors:", depending on how many people are listed)
 - writers_prefix (same as `directors_prefix`)
 - discover_filter_keywords_included_fmt
 - discover_filter_keywords_excluded_fmt

To be fair, I've made this list taking only Russian into account. Maybe it will be easier to just pluralize all strings with number values, so that it can work for all supported languages.

Date format strings

Date format strings should also be localizable, like livetv_guide_date in Live TV.

Non-localized values

Values that are currently not localizable should be added to Weblate as well. In terms of storage amounts, I have seen that there is a file_size_gb string available, but that one uses a floating-point placeholder, so I'm not sure if that one can be used for non-localized storage amount in pages I've indicated. file_size_mb probably can fit there when it shows MBs.

Alternatives considered

No response

Feature area

UI/Design

Priority

Low - Nice to have

Mockups or examples

No response

Use case

No response

Additional context

No response

Device

Google Pixel 10 Pro XL

Android version

17 (GrapheneOS Build 2026080501)

Afinity version

v0.10.9-beta (Latest Nightly)

Checklist

  • [x] I have searched for similar feature requests before creating this one
  • [x] This feature would benefit multiple users, not just myself
  • [x] I am willing to help test this feature if implemented

arsenii-mitianin avatar Aug 15 '26 11:08 arsenii-mitianin