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

Enable plurals tags to match android format #145

Closed
davidec-twinlogix opened this issue Jan 5, 2021 · 3 comments · Fixed by #274
Closed

Enable plurals tags to match android format #145

davidec-twinlogix opened this issue Jan 5, 2021 · 3 comments · Fixed by #274
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@davidec-twinlogix
Copy link

I'm using moko-resources in a project where resource files are pulled from an external translation service in android format.
It would be nice that also "plurals" tag is processed along with "plural".

 <plurals name="hours">
        <item quantity="one">%1$s hour</item>
        <item quantity="other">%1$s hours</item>
 </plurals>

 <plural name="weeks">
        <item quantity="one">%1$s week</item>
        <item quantity="other">%1$s weeks</item>
 </plural>
@steviek
Copy link

steviek commented Jan 5, 2021

I just ran into the same issue earlier, I thought it wasn't working and didn't realize it was plural instead of plurals until I copy+pasted the example code.

If changing to plurals isn't possible, having the generator throw an exception when you use plurals would be helpful to debug issues

@Alex009 Alex009 added the enhancement New feature or request label Jan 9, 2021
@Alex009
Copy link
Member

Alex009 commented Jan 9, 2021

i think we can add alias for plural in generator.
and maybe we should add warnings in parsing of xml when found unknown tags

asapha added a commit to asapha/moko-resources that referenced this issue Jan 8, 2022
'plurals' match the element name used on the Android platform.
This allows us to upload the source xml as-is to translation websites as they'll
interpret it as an Android resource file.

Fixes icerockdev#145.
@Alex009 Alex009 linked a pull request Jan 10, 2022 that will close this issue
@Alex009 Alex009 added this to the 0.18.0 milestone Jan 10, 2022
asapha added a commit to asapha/moko-resources that referenced this issue Jan 15, 2022
'plurals' match the element name used on the Android platform.
This allows us to upload the source xml as-is to translation websites as they'll
interpret it as an Android resource file.

Fixes icerockdev#145.
Alex009 added a commit that referenced this issue Jan 16, 2022
#145: allow the usage of 'plurals' as an element
@Alex009
Copy link
Member

Alex009 commented Jan 16, 2022

will be available in 0.18.0.
thanks to @asapha

@Alex009 Alex009 closed this as completed Jan 16, 2022
@Alex009 Alex009 self-assigned this Jan 16, 2022
@Alex009 Alex009 mentioned this issue Jan 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants