Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Make pluralized strings compatible with GlotPress #167

Merged
merged 2 commits into from
Aug 27, 2021

Conversation

obulat
Copy link
Contributor

@obulat obulat commented Aug 26, 2021

Fixes

Related to #151 by @zackkrida

Description

This PR splits pluralized strings into 2, in accordance with GlotPress requirements:
For count of 0:

# browse-page.image-no-results 
#: /components/SearchGridManualLoad.vue:109
msgctxt "browse-page.image-no-results"
msgid "no image results"
msgstr ""

For counts of > 0 and less than 10 000:

# browse-page.image-result-count (Do not translate words between ###)
#: /components/SearchGridManualLoad.vue:115
msgctxt "browse-page.image-result-count"
msgid "###localeCount### image result"
msgid_plural "###localeCount### image results"
msgstr[0] ""
msgstr[1] ""

For counts over 10 000:

# browse-page.image-result-count-more (Do not translate words between ###)
#: /components/SearchGridManualLoad.vue:112
msgctxt "browse-page.image-result-count-more"
msgid "Over ###localeCount### image results"
msgid_plural "Over ###localeCount### image results"
msgstr[0] ""
msgstr[1] ""

The last one does not need pluralization for English (it's only plural). It was, however, included here for other languages, where different noun endings are used based on the count (eg. Russian :) )

Checklist

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the default branch of the repository (main or master).
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@obulat obulat requested a review from a team as a code owner August 26, 2021 10:16
@obulat obulat requested review from zackkrida and krysal and removed request for a team August 26, 2021 10:16
@zackkrida
Copy link
Member

different noun endings are used based on the count

🤯 Wow, did not realize that.

@obulat obulat requested a review from dd32 August 26, 2021 12:43
@zackkrida zackkrida merged commit 5ad584e into custom-pot-script Aug 27, 2021
@zackkrida zackkrida added the 🧰 goal: internal improvement Improvement that benefits maintainers, not users label Sep 8, 2021
@dhruvkb dhruvkb deleted the pluralization branch September 8, 2021 09:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🧰 goal: internal improvement Improvement that benefits maintainers, not users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants