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

choose_data_directory_available_space need to be a plural-form string #7166

Open
4 tasks done
rffontenelle opened this issue May 6, 2024 · 3 comments
Open
4 tasks done
Labels
Good first issue Can be addressed without deep knowledge of the AntennaPod code. But exploring the code may be needed Type: Possible bug Issues that seem to be a bug, but haven't been confirmed yet

Comments

@rffontenelle
Copy link

rffontenelle commented May 6, 2024

Checklist

  • I have used the search function for OPEN issues to see if someone else has already submitted the same bug report.
  • I have also used the search function for CLOSED issues to see if the problem is already solved and just waiting to be released.
  • I will describe the problem with as much detail as possible.
  • If the bug only to occurs with a certain podcast, I will include the URL of that podcast.

App version

latest unreleased commit

Where did you get the app from

Other

Android version

unrelated

Device model

unrelated

First occurred

No response

Steps to reproduce

No response

Expected behaviour

To be able to translate properly plural scenarios of:

<string name="choose_data_directory_available_space">%1$s of %2$s free</string>

https://github.com/AntennaPod/AntennaPod/blob/ba14510b80bc7340c68ae298c795ad62c35c86a0/ui/i18n/src/main/res/values/strings.xml#L670C19-L670C56

Current behaviour

In my language (pt_BR), the translation of "free" is singular if %1$s is 0 or 1, plural otherwise. I'm unable to do such translation.

A workaround was to put alternative s between parentheses "livre(s)", which is not ideal.

Logs

No response

@rffontenelle rffontenelle added the Type: Possible bug Issues that seem to be a bug, but haven't been confirmed yet label May 6, 2024
@ByteHamster ByteHamster added the Good first issue Can be addressed without deep knowledge of the AntennaPod code. But exploring the code may be needed label May 8, 2024
@ApostolosKourpadakis
Copy link

Hello

One implementation that may work is the same that is used for example in lines 620-623 of the file you provided. There for plurals we have something like that:

1 day
%d days

We can do something similar but it depends on the language. For example in Greek language it can be like that:

%1$s από τα %2$s ελεύθερο
%1$s από τα %2$s ελεύθερα

For portoguese for example, you have to modify this and add also the case of zero (in Greek only for value of one it has singular)

@rffontenelle
Copy link
Author

Looking at the source code of time_days_quantified (key for 1 day / %d days), I see that Converter.java has a different treatment than choose_data_directory_available_space's.

Doesn't this task require editing the .java file as well (not only the string.xml) ?

@ByteHamster
Copy link
Member

Doesn't this task require editing the .java file as well

Yes it does

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good first issue Can be addressed without deep knowledge of the AntennaPod code. But exploring the code may be needed Type: Possible bug Issues that seem to be a bug, but haven't been confirmed yet
Projects
None yet
Development

No branches or pull requests

3 participants