Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

android2csv: <plurals> are removed #138

Open
GrzesiekZbozien opened this issue Jul 2, 2020 · 3 comments
Open

android2csv: <plurals> are removed #138

GrzesiekZbozien opened this issue Jul 2, 2020 · 3 comments

Comments

@GrzesiekZbozien
Copy link

For android strings.xml it is possible to use plurals:
https://developer.android.com/guide/topics/resources/string-resource#Plurals

But when exporting to CSV this item is missing.

Example:
<plurals name="plural_name"> <item quantity=["zero" | "one" | "two" | "few" | "many" | "other"] >text_string</item> </plurals>

And result won't have item with 'plural_name'

It will make sense to also translate plurals.
Any ideas how to fix or workaround this issue?

@netbe
Copy link
Owner

netbe commented Jul 5, 2020

Hi @GrzesiekZbozien,

I don't see how to represent plurals into a csv format, that's the issue

@GrzesiekZbozien
Copy link
Author

if normal string in csv is represented as key string_name, value-en, value-de, value-fr, etc

What about:

  • use plural_name and quantity, so CSV might look like:
    plural_name.zero, value-en, value-de, value-fr, etc, plural_name.one, value_one-en, value_one-de, value_one-fr, etc, ... plural_name.other, value_other-en, value_other-de, value_other-fr, etc,

Also if CSV2Base wouldn't be able to handle plurals it could be used as normal strings plural_name.zero, plural_name.one, etc.

For now I have removed plurals from our project, but it would be nice to have an option to use them.

@4brunu
Copy link
Contributor

4brunu commented Sep 17, 2021

This would be a great addition, another alternative would be something like plural_name[zero].
This idea was taken from https://localazy.com/docs/cli/ios-format#plurals-in-strings

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

No branches or pull requests

3 participants