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

Hotfix: compare locales with suffix as case-insensitive #654

Closed
wants to merge 16 commits into from
Closed

Hotfix: compare locales with suffix as case-insensitive #654

wants to merge 16 commits into from

Conversation

mcdmaster
Copy link

Comparison of locale codes in complete fashion i.e. ISO-631 Language Code and ISO-3166 Country / Region Code concatenated with a hyphen in between needs to be done as case-insensitive.

Not only have many web developers but also we ourselves been figured out that they used to use "complete" language codes in entirely lower case letters like zh-cn, zh-tw etc.

@codecov
Copy link

codecov bot commented Apr 3, 2020

Codecov Report

Merging #654 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #654   +/-   ##
=======================================
  Coverage   99.18%   99.18%           
=======================================
  Files           3        3           
  Lines         122      122           
  Branches       32       32           
=======================================
  Hits          121      121           
  Misses          1        1

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 d61f936...40eb463. Read the comment docs.

@mcdmaster
Copy link
Author

Related issue: Tokyo-Metro-Gov/covid19#2765

src/templates/utils-common.js Outdated Show resolved Hide resolved
@mcdmaster mcdmaster requested a review from rchl April 3, 2020 13:55
Copy link
Collaborator

@rchl rchl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a test for matching case-insensitively in unit.test.js.

src/templates/utils-common.js Outdated Show resolved Hide resolved
test/unit.test.js Outdated Show resolved Hide resolved
test/unit.test.js Show resolved Hide resolved
test/unit.test.js Outdated Show resolved Hide resolved
@rchl
Copy link
Collaborator

rchl commented Apr 3, 2020

I'll take over in few hours when I have free time

@mcdmaster
Copy link
Author

I'll take over in few hours when I have free time

Thank you @rchl, it helps us fight against COVID-19 in Japan but we are having multilingual, multinational and multicultural neighbors. I would like to meet up with you when we can overcome this panic situation around the globe! Thanks again

@rchl
Copy link
Collaborator

rchl commented Apr 3, 2020

Resolved with e614e8e

@rchl rchl closed this Apr 3, 2020
@mcdmaster
Copy link
Author

Thank you very much!

@mcdmaster
Copy link
Author

Hi @rchl,

Do you mind being added to our Contributors' List?
For sure, I would like to recommend our team to do so.
Can you please let me hear your opinion? Thanks in advance

@rchl
Copy link
Collaborator

rchl commented Apr 4, 2020

I don't mind. Go ahead. :)

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.

None yet

3 participants