Skip to content

4.2.4 or 4.6.2 to note challenge of "en-us" and dot-property notation code #251

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

Closed
azaroth42 opened this issue Sep 16, 2019 · 0 comments · Fixed by #265
Closed

4.2.4 or 4.6.2 to note challenge of "en-us" and dot-property notation code #251

azaroth42 opened this issue Sep 16, 2019 · 0 comments · Fixed by #265

Comments

@azaroth42
Copy link
Contributor

Both descriptions of the language map pattern talk about the utility of using object.en as a method of accessing the data. However, neither mention the subsequent headache of "-region" or other BCP47 values beyond the simple two letter code for the language as a whole.

If I use "en-us" as the language of my string then I just broke everyone's dot-property notation code, as they'll try in vain to do:

text = object.occupation.en - us;

and hopefully get a 'Variable Not Defined: us' error, and at worst (if us is defined as something that can be subtracted from a string) some very badly broken content.

This should be in a note in one or both of the descriptions.

gkellogg added a commit that referenced this issue Sep 24, 2019
…gs other than the primary language-tag.

Fixes #251.
gkellogg added a commit that referenced this issue Sep 25, 2019
…gs other than the primary language-tag.

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

Successfully merging a pull request may close this issue.

1 participant