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

pt-BR localization - month names should not be capitalized #5109

Closed
kendramae opened this issue May 15, 2019 · 5 comments · Fixed by #5158
Closed

pt-BR localization - month names should not be capitalized #5109

kendramae opened this issue May 15, 2019 · 5 comments · Fixed by #5158

Comments

@kendramae
Copy link

Month names should not be capitalized in Portuguese (See: https://meta.wikimedia.org/wiki/Capitalization_of_Wiktionary_pages#Capitalization_of_month_names) It looks like it originally was correct, but then was changed? (See: #4557) -- it may be as simple as reverting that commit.

@AbidemiT
Copy link

Hello kendramae can I work on this issue?

@davidrock
Copy link

davidrock commented May 20, 2019

It depends on the situation. Here in Brasil we need to capitalize when it is an proper noun.

Common example: "I was born in January":

CORRECT: Eu nasci em janeiro.
WRONG: Eu nasci em Janeiro.

Proper noun example: "September 11 attacks":
CORRECT: Ataques de 11 de Setembro
WRONG: Ataques de 11 de setembro

We also need to capitalize when it is a single word or it is the first word of a phrase/sentence.
To be honest, I don't think it is that important or is something to be "fixed".

@sayhicoelho
Copy link

Ainda bem que sei usar a pesquisa, porque já estava abrindo uma issue pra isso mesmo. Parece que o jeito é usar toLowerCase().

I'm glad I use the search, because I was already opening an issue for that. It seems like the way to use toLowerCase().

@sayhicoelho
Copy link

It depends on the situation. Here in Brasil we need to capitalize when it is an proper noun.

Common example: "I was born in January":

CORRECT: Eu nasci em janeiro.
WRONG: Eu nasci em Janeiro.

Proper noun example: "September 11 attacks":
CORRECT: Ataques de 11 de Setembro
WRONG: Ataques de 11 de setembro

We also need to capitalize when it is a single word or it is the first word of a phrase/sentence.
To be honest, I don't think it is that important or is something to be "fixed".

No, it not depends on the situation. 11 de Setembro is not a date, is a historical fact.

We need to capitalize only when the month starts in the beginning of phrase.

Correct: Iniciou em 01 de janeiro.
Wrong: Iniciou em 01 de Janeiro.

Correct: Janeiro foi o dia da viagem.
Wrong: janeiro foi o dia da viagem.

@kylekatarnls
Copy link

kylekatarnls commented Jun 5, 2019

moment should provide the default case as per the locale rule (lower case for pt-BR), and if you have a special case to handle (start of sentence), it's no longer the responsibility of moment (does not depends on the locale most of the time and never depends on the date itself) so it should be handled afterward: .toUpperCase() on the first letter for example.

See google/closure-library:
https://github.com/google/closure-library/blob/558f3f513ff20bf46e04815e14a2d8cf5e15e7d9/closure/goog/i18n/datetimesymbols.js#L2670

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 a pull request may close this issue.

5 participants