Skip to content

Bad iOS plurals in Localizable.stringsdict (auto translate?) #16198

@vng

Description

@vng

Describe the issue

I constantly get bad translations for plurals (Localizable.stringsdict).

Even when they are placed in a separate Component, and this component is locked for translations.
I got this change immediately every time I make "Reset all changes".

The component: https://hosted.weblate.org/projects/organicmaps/ios-plurals/
Again the latest change: https://github.com/organicmaps/organicmaps/pull/11336/files

I already tried

  • I've read and searched the documentation.
  • I've searched for similar filed issues in this repository.

Steps to reproduce the behavior

Make Localizable.stringsdict with NSStringLocalizedFormatKey. For example:

<key>bookmarks_places</key>
	<dict>
		<key>NSStringLocalizedFormatKey</key>
		<string>%#@value@</string>
		<key>value</key>
		<dict>
			<key>NSStringFormatSpecTypeKey</key>
			<string>NSStringPluralRuleType</string>
			<key>NSStringFormatValueTypeKey</key>
			<string>d</string>
			<key>one</key>
			<string>%d əlfəcin</string>
			<key>other</key>
			<string>%d əlfəcinlər</string>
		</dict>
	</dict>

is always replaced with

<key>zero</key>
<string>əlfəcin</string>

Expected behavior

  • Disable autotranslations for plurals (how?)
  • Respect translations lock
  • Are there any best practicies for iOS plurals translations?

Screenshots

Image

Exception traceback

How do you run Weblate?

No response

Weblate versions

No response

Weblate deploy checks

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions