Anki-Android icon indicating copy to clipboard operation
Anki-Android copied to clipboard

May be plurals added to following strings

Open krmanik opened this issue 3 years ago • 2 comments

Running following lint give warning for the strings that should be changed to plurals.

lint --check PluralsCandidate ./res

http://tools.android.com/tips/lint-checks

Result

res\values\02-strings.xml:409: Warning: Formatting %d followed by words ("files"): This should probably be a plural rather than a string [PluralsCandidate]
    <string name="malicious_archive_exceeds_limit">Malicious archive. Size exceeds %1$s or contains more than %2$d files</string>
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
res\values\03-dialogs.xml:91: Warning: Formatting %d followed by words ("existing"): This should probably be a plural rather than a string [PluralsCandidate]
    <string name="import_update_details">Updated %1$d of %2$d existing notes.</string>
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
res\values\03-dialogs.xml:178: Warning: Formatting %d followed by words ("cards"): This should probably be a plural rather than a string [PluralsCandidate]
    <string name="integrity_check_fixed_no_home_deck">%d cards with incorrect home decks were recovered. Please see the manual for more information.</string>
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
res\values\04-network.xml:56: Warning: Formatting %d followed by words ("seconds"): This should probably be a plural rather than a string [PluralsCandidate]
    <string name="sync_log_clocks_unsynchronized">Your clockÆs off by %1$d seconds%2$s. Make sure that the date, time, and timezone on your phone are set correctly, then sync again.</string>
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
res\values\04-network.xml:83: Warning: Formatting %d followed by words ("media"): This should probably be a plural rather than a string [PluralsCandidate]
    <string name="sync_media_partial_updated">Media sync partially completed:\n%1$d media files downloaded.\n%2$d media files uploaded.</string>
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
res\values\04-network.xml:84: Warning: Formatting %d followed by words ("media"): This should probably be a plural rather than a string [PluralsCandidate]
    <string name="sync_media_changes_count">%d media changes to upload</string>
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
res\values\04-network.xml:85: Warning: Formatting %d followed by words ("media"): This should probably be a plural rather than a string [PluralsCandidate]
    <string name="sync_media_downloaded_count">%d media files downloaded</string>
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
res\values\10-preferences.xml:126: Warning: Formatting %d followed by words ("cards"): This should probably be a plural rather than a string [PluralsCandidate]
    <string name="notification_minimum_cards_due">More than %d cards due</string>
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0 errors, 8 warnings

krmanik avatar Sep 19 '22 15:09 krmanik

Oh! Really nice find

mikehardy avatar Sep 19 '22 16:09 mikehardy

I'll take this!

driuft avatar Sep 19 '22 17:09 driuft

Hi. If no one is working on this, can I take this one?

siju-s avatar Oct 01 '22 07:10 siju-s

@siju-s Go ahead and take this 👍

driuft avatar Oct 01 '22 09:10 driuft

Is there anyone still working on this? I'm looking for a good first issue to start contributing and I might be able to take care of this.

jaohara avatar Oct 19 '22 00:10 jaohara

Out of the 8 Plural Candidates. 2 (First and last one) probably don't need to be changed to plurals. For first one , both the params are constants. So String will be always be same. For last one, It is used to create "notify when" dialog in notification preferences where strings always in plural form. For remaining, we need to add plurals. It looks like no one is assigned to this. @mikehardy can you assign this to me ?

riotgage avatar Nov 05 '22 09:11 riotgage

Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

github-actions[bot] avatar Jan 04 '23 09:01 github-actions[bot]

Hi is this issue resolved or can I work on it. I am a novice and I want to get started with open source. I would love to get help from community

Ash-2k3 avatar Jan 19 '23 21:01 Ash-2k3

Hey, If no one's working on this, I would like to work on it.

deekshatw avatar Feb 22 '23 09:02 deekshatw

@deekshatw You've requested a number of issues, it'd be good to get a PR in for those before taking on more

david-allison avatar Feb 22 '23 14:02 david-allison

@david-allison hey I wanted to know if the issue is still open? I can take up this issue and solve it.

Sreejan100 avatar Mar 30 '23 07:03 Sreejan100