question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Predictable message catalog output when using lingui extract

See original GitHub issue

I would love if lingui extract output the JSON file in a predictable way (e.g. ordered alphabetically), since we check in the resulting translation file and the shuffling of keys due to source code changing positions generates a lot of noise in the diffs.

I’m up to create a PR for this if you’d like.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
tricoder42commented, Jul 4, 2018

Fixed and released in v2.2.0. Thanks to all involved!

0reactions
tricoder42commented, Jun 20, 2018

Thank you @queicherius and @nicolas-cherel for your inputs!

Let’s sort it alphabetically for now. We might make it configurable in the future, but I like the simplicity of alphabetic sort.

@queicherius, still interested in PR?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Working with LinguiJS CLI
@lingui/cli provides the lingui command for extracting, merging and compiling message catalogs. Follow setup instructions to install required packages.
Read more >
babel-plugin-lingui-extract-messages doesn't work ... - GitHub
babel-plugin-lingui-extract-messages is no longer part of babel-preset-lingui-react . It's add manually by CLI when running lingui extract ...
Read more >
Localizing JavaScript & React Apps with LinguiJS | Phrase
This will allow us to test out Lingui's translation workflow, working with messages, the CLI, plurals, and date formatting. Let's get started.
Read more >
GNU gettext utilities
Program xgettext extracts all marked messages from a set of C files and initializes a PO file with empty translations. Program msgmerge takes...
Read more >
i18n of React with Lingui.js #1 - DEV Community ‍ ‍
Install ; "lingui add-locale <language>" to add more locales) ; "lingui extract" to update catalogs with new messages) ; "lingui compile" to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found