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

add option to sorting message by a locale's order #703

Merged
merged 2 commits into from
Aug 27, 2023

Conversation

dantman
Copy link
Contributor

@dantman dantman commented Dec 8, 2021

i18n Ally uses a binary sort when it sorts keys. This is unexpected ("O" is sorted before "o") and doesn't take differences in how languages sort things into account.

This change adds two config settings sortCompare and sortLocale.

  • By default sortCompare is binary which is the current behaviour
  • You can set sortCompare to locale and set sortLocale to en and keys will be ordered according to English rules for sorting text.
  • Alternatively you can set sortCompare to locale and leave sortLocale unspecified and each messages file will be sorted according to its own locale (e.g. en/common.json will be sorted using English order, while es/common.json will be sorted according to Spanish order).

Fixes #702

@traverse
Copy link

Is there anything that can be done to move this along? Would really love to be able to use this feature.

@dantman
Copy link
Contributor Author

dantman commented Mar 29, 2022

I don't know. Nothing has been committed to this project since October. And an issue discussing the state of the project (#694) was closed by the opener because maintenance was promised to happen in December and then the maintainers disappeared.

@arnonrdp
Copy link
Contributor

Maybe, it is better to work on a fork: openscript-ch#1

@terales terales requested a review from kibertoad as a code owner August 27, 2023 20:57
@terales terales merged commit ae6972a into lokalise:main Aug 27, 2023
huacnlee pushed a commit to huacnlee/i18n-ally that referenced this pull request Aug 28, 2023
)

* add option to sorting message by a locale's order

Fixes lokalise#702

* Empty commit to trigger CI

---------

Co-authored-by: Alex Terehov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Allow keys to be sorted alphabetically instead of binarily
4 participants