Skip to content
This repository was archived by the owner on Oct 26, 2022. It is now read-only.

Use Local Specific ToUpperCase #293

Open
2 tasks done
Karvel opened this issue Mar 19, 2021 · 0 comments
Open
2 tasks done

Use Local Specific ToUpperCase #293

Karvel opened this issue Mar 19, 2021 · 0 comments
Labels
bug Something isn't working feature New feature or change that directly affects users test Code tests only

Comments

@Karvel
Copy link
Contributor

Karvel commented Mar 19, 2021

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.

  1. Go to the webapp.
  2. Confirm that the elements which used the uppercase pipe previously are still in uppercase with the localeuppercase pipe.
  3. Select a pipe.
  4. Pass it a language that regular toUpperCase() does not handle correctly, like Turkish: | localeuppercase: 'tr-TR'
  5. Change the text to use the following lower case characters: ıi.
  6. Confirm that the capitalized text is the following:

Learning

http://www.moserware.com/2008/02/does-your-code-pass-turkey-test.html

@Karvel Karvel added bug Something isn't working feature New feature or change that directly affects users test Code tests only labels Mar 20, 2021
@Karvel Karvel added this to the Translation - Sprint #5 milestone Mar 20, 2021
@Karvel Karvel self-assigned this Mar 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working feature New feature or change that directly affects users test Code tests only
Projects
None yet
Development

No branches or pull requests

1 participant