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

Bug: "extract --sort" not working when output is set to POT #140

Open
1 task done
votdev opened this issue Jun 20, 2022 · 4 comments
Open
1 task done

Bug: "extract --sort" not working when output is set to POT #140

votdev opened this issue Jun 20, 2022 · 4 comments
Labels
bug Something isn't working PRs welcome

Comments

@votdev
Copy link

votdev commented Jun 20, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Is this a regression?

No

Current behavior

Running transloco-keys-manager extract --sort does not sort the keys in the output file.

The output looks like this for previously started project:

msgid ""
msgstr ""
"mime-version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"

msgid "Toggle navigation"
msgstr ""

msgid "Help"
msgstr ""

msgid "Dashboard"
msgstr ""

msgid "OK"
msgstr ""

msgid "Cancel"
msgstr ""

msgid "Yes"
msgstr ""

msgid "No"
msgstr ""

msgid "Users"
msgstr ""

msgid "Do you really want to sign out?"
msgstr ""

Expected behavior

The keys/msgid should be sorted, e.g. like ngx-translate-extract is doing it.

Please provide a link to a minimal reproduction of the bug

https://github.com/aquarist-labs/s3gw-ui

Transloco Config

module.exports = {
  rootTranslationsPath: 'src/assets/i18n/',
  langs: ['en_US'],
  keysManager: {
    fileFormat: 'pot',
    marker: 'TEXT',
    defaultValue: ''
  }
};

Debug Logs

No response

Please provide the environment you discovered this bug in

Transloco: 4.1.0
Transloco Keys Manager: 3.4.1
Angular: 13.3.11
Node: v16.15.1
Package Manager: 
OS: Ubuntu

Additional context

No response

I would like to make a pull request for this bug

No

@shaharkazaz
Copy link
Collaborator

@votdev Please provide the expected result and the actual result. I don't understand the output you pasted.

@votdev
Copy link
Author

votdev commented Jul 24, 2022

@votdev Please provide the expected result and the actual result. I don't understand the output you pasted.

Sure.

The current output looks like this (taken from above):

msgid ""
msgstr ""
"mime-version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"

msgid "Toggle navigation"
msgstr ""

msgid "Help"
msgstr ""

msgid "Dashboard"
msgstr ""

msgid "OK"
msgstr ""

msgid "Cancel"
msgstr ""

The expected result is this when using the --sort option.

msgid ""
msgstr ""
"mime-version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"

msgid "Cancel"
msgstr ""

msgid "Dashboard"
msgstr ""

msgid "Help"
msgstr ""

msgid "OK"
msgstr ""

msgid "Toggle navigation"
msgstr ""

@shaharkazaz
Copy link
Collaborator

@votdev so if I understand correctly it seems that the issue is occurring when using POT output format, can you confirm?

@votdev
Copy link
Author

votdev commented Aug 19, 2022

@votdev so if I understand correctly it seems that the issue is occurring when using POT output format, can you confirm?

Yes

@shaharkazaz shaharkazaz added bug Something isn't working PRs welcome labels Dec 16, 2022
@shaharkazaz shaharkazaz changed the title Bug: "extract --sort" does not work Bug: "extract --sort" not working when output is set to POT Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working PRs welcome
Projects
None yet
Development

No branches or pull requests

2 participants