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

Add Serbian language translation #283

Merged
merged 1 commit into from
Mar 12, 2021

Conversation

sabljak
Copy link
Contributor

@sabljak sabljak commented Mar 11, 2021

Hello.

Here's the Serbian locale. For no_items the sentence will be written in a different way depending on the count of items.
For example:

  • one item: "Није пронађенa %{item_name}"
  • multiple items: "Нema пронађених %{item_name}"

Is there a way to use one or the other depending on the count?

😃

@codecov
Copy link

codecov bot commented Mar 11, 2021

Codecov Report

Merging #283 (20a4cc7) into master (3a0aafb) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #283   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           25        25           
  Lines          532       532           
=========================================
  Hits           532       532           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3a0aafb...20a4cc7. Read the comment docs.

@ddnexus
Copy link
Owner

ddnexus commented Mar 11, 2021

Thank you for your PR!

Is there a way to use one or the other depending on the count?

Yes, for the no_items you basically do the same as for the item_name, i.e. adding all the plurals for the language (even if there are duplicates). Full info here.

@sabljak
Copy link
Contributor Author

sabljak commented Mar 11, 2021

I hope this resolves the issue.

@ddnexus
Copy link
Owner

ddnexus commented Mar 11, 2021

@sabljak it does not solve the issue at all, since the no_item key that you added will never get used by the code.

Actually looking at the "problem" again, I missed the fact that no_items get used only when the count is 0, so I don't get how you may need different pluralizations.

key = if (count = pagy.count) == 0 ; 'pagy.info.no_items'

Could you explain me what you mean?

@sabljak
Copy link
Contributor Author

sabljak commented Mar 11, 2021

My bad, I didn't think it all the way through. The initial no_items translation will do just fine.

Change no_items translation


Add singular no_item


Remove unnecessary line
@sabljak
Copy link
Contributor Author

sabljak commented Mar 11, 2021

@ddnexus All done. Hope everything is OK.

@ddnexus ddnexus changed the base branch from master to dev March 12, 2021 02:46
@ddnexus ddnexus merged commit 8da0e06 into ddnexus:dev Mar 12, 2021
@ddnexus
Copy link
Owner

ddnexus commented Mar 12, 2021

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants