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

Translation is failing with upcase flag #564

Closed
bmfreitas opened this issue Jul 6, 2015 · 2 comments
Closed

Translation is failing with upcase flag #564

bmfreitas opened this issue Jul 6, 2015 · 2 comments
Labels

Comments

@bmfreitas
Copy link

According to the standard lib, the flag ^ should upcase the result string, so considering the following setup:

pt-BR:
  date:
    formats:
      default: "%B %d, %Y"
    month_names: [~, Janeiro, Fevereiro, Março, Abril, Maio, Junho, Julho, Agosto, Setembro, Outubro, Novembro, Dezembro]

The statement I18n.l '6/7/2015'.to_date results in Julho 06, 2015, which is OK.

Now, considering the following setup:

pt-BR:
  date:
    formats:
      default: "%^B %d, %Y"
    month_names: [~, Janeiro, Fevereiro, Março, Abril, Maio, Junho, Julho, Agosto, Setembro, Outubro, Novembro, Dezembro]

The statement I18n.l '6/7/2015'.to_date results in JULY 06, 2015.

Note that the flag ^ was properly applied (upcase), but the translation failed, as it should be JULHO.

Am I missing something?

@digitalfrost
Copy link
Collaborator

This issue has been marked as stale because it has not had recent activity.
@bmsatierf sorry nobody answered your question.
Thank you for your contributions.

@tbelliard
Copy link

In case anyone is landing on this issue (like I did) when investigating a similar issue, just note that the issue was fixed at i18n level. The following pull request was merged in Feb. 2019, and I can confirm that latest versions of i18n fix the problem : ruby-i18n/i18n#468

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

No branches or pull requests

3 participants