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

Text transformations (e.g. title case, capitalize first letter, lower case) #38

Closed
grhoten opened this issue Feb 10, 2020 · 2 comments
Closed
Labels
registry requirements Issues related with MF requirements list

Comments

@grhoten
Copy link
Member

grhoten commented Feb 10, 2020

Is your feature request related to a problem? Please describe.
Since variables move around in a sentence, it can become important to have letter casing to be specified by a message. If English puts a variable in the middle of a message and another language puts it at the beginning of a message, it may need the first letter upper cased. If you have optional data at the front of a message, you may need to optionally case the first letter of a sentence.

Describe the solution you'd like
We need a way to do the following:

  • Capitalize the first word of a span of text. Maybe this can be called sentence case.
  • Title case the variable
  • Lower case a variable (because the source English made a bad design choice)
  • Upper case a variable (I haven't seen this, but it might be needed)

Describe why your solution should shape the standard
Message formatting can't handle this type of localization issue right now.

Additional context or examples
source: The ${variable} is turned on
grammar of a target language: ${variable} is turned on

In that example, the result of the variable named "variable" would need the first letter upper cased.

@mihnita
Copy link
Collaborator

mihnita commented Feb 14, 2020

+100 for sentence case

Doubts for the rest:

  • I am not aware of any language other than English doing title case.
  • Doing lowercase algorithmically is highly problematic (for example "WEISS" might lowercase to "weiss" or "weiß" or "Weiss" or "Weiß" depending on the meaning)

To the argument "because the source English made a bad design choice" I would say: file a bug, that is bad i18n.
We should not try to pass the responsibility of fixing i18n problems to localization (in tens of languages)

@aphillips
Copy link
Member

As mentioned in today's telecon (2023-09-18), closing old requirements issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
registry requirements Issues related with MF requirements list
Projects
None yet
Development

No branches or pull requests

3 participants