netbe / Babelish

Chaotically confused, like Babel
http://netbe.github.io/Babelish
MIT License
253 stars 84 forks source link

android2csv: <plurals> are removed #138

Open GrzesiekZbozien opened 4 years ago

GrzesiekZbozien commented 4 years ago

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 `

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 commented 4 years ago

Hi @GrzesiekZbozien,

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

GrzesiekZbozien commented 4 years ago

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

What about:

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 commented 2 years ago

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