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

Use Local Specific ToUpperCase #293

Open
@Karvel

Description

@Karvel

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfeatureNew feature or change that directly affects userstestCode tests only

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions