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 relative locales to czech language #312

Closed
wants to merge 1 commit into from

Conversation

NikolaRusakov
Copy link

Add czech language locale fuctionality

@codecov-io
Copy link

codecov-io commented Aug 24, 2018

Codecov Report

Merging #312 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #312   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          32     33    +1     
  Lines         386    389    +3     
  Branches       53     53           
=====================================
+ Hits          386    389    +3
Impacted Files Coverage Δ
src/locale/cs.js 100% <100%> (ø)

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 002b695...6d0a66b. Read the comment docs.

@prantlf
Copy link
Contributor

prantlf commented Sep 3, 2018

Coincidentally, I added the Czech locale too :-) As a part of PR #305 with the plugin called LocalisableFormat.

Differences to this PR:

  • The key "s" translated as "several seconds" and not "second".
  • Keys for the single value (s, m, h, d, M, Y) translated with the correct declension:
    • if used in the expression for the future.
    • if used in the expression with duration; only if the duration is used in accusative - in the expression "takes ..."., for example

In my case, expressions for the past cannot be translated correctly,because the preposition needs a different declension. In your case, you decided to translate correctly expressions of the past (although moving the preposition "before" after the value feels weird) and durations in nominative.

I opened issue #302 to explain and discuss the problem of the correct localisation. I sent PR #304, which localises the three scenarios (duration, future and past) with three different texts, optionally, if needed in a particular locale. I updated the Czech locale in that PR accordingly.

@greegus
Copy link
Contributor

greegus commented Oct 9, 2018

@NikolaRusakov beware that the weekdays list should be indexed from Sunday, not Monday.
https://github.com/iamkun/dayjs/blob/master/src/locale/de.js

@stepanh
Copy link

stepanh commented Jan 16, 2019

Czech language requires more complex rules as highlighted by @prantlf above

@iamkun
Copy link
Owner

iamkun commented Jan 22, 2019

I'll merge czech language locale #461, cause weekdays list should be indexed from Sunday.

BTW, @stepanh I'll do it later to support more complex rules like prantlf mentioned above.

@iamkun iamkun closed this Jan 22, 2019
@stepanh
Copy link

stepanh commented Jan 22, 2019

cc @prantlf

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.

6 participants