Use Local Specific ToUpperCase #293
Description
Desired Use Case
Looks much better like this, but wonder if you are going to keep uppercase
since in some languages (Like Turkish language) that would make a difference.
Originally posted by @Basim-Elayan in #287 (comment)
The webapp should use toLocaleUpperCase
instead of toUpperCase
in templates. The webapp uses pipes to perform this, so it should have a new LocalUpperCasePipe
to handle upper case duties. This pipe should be able to accept a parameter, and also be able to consume the current language from transloco.
Actual/Current Behavior
The webapp uses the built in uppercase
pipe which uses toUpperCase
internally.
Steps to Implement This Feature
- Add
LocaleUpperCasePipe
and tests. - Wire up and replace
uppercase
.
Testing Steps
If you are not a member of this project, skip this step
How do the users test this change?
As there is no Turkish in the project currently, testing this beyond the unit tests requires making some shims.
- Go to the webapp.
- Confirm that the elements which used the
uppercase
pipe previously are still in uppercase with thelocaleuppercase
pipe. - Select a pipe.
- Pass it a language that regular
toUpperCase()
does not handle correctly, like Turkish:| localeuppercase: 'tr-TR'
- Change the text to use the following lower case characters:
ıi
. - Confirm that the capitalized text is the following:
Iİ
Learning
http://www.moserware.com/2008/02/does-your-code-pass-turkey-test.html