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

lingui adding new characters into translations during extract | bug #1051

Closed
seeden opened this issue Apr 22, 2021 · 3 comments
Closed

lingui adding new characters into translations during extract | bug #1051

seeden opened this issue Apr 22, 2021 · 3 comments

Comments

@seeden
Copy link

seeden commented Apr 22, 2021

I have .po file with next context

#: src/components/farm/FarmYourHarvesterNetwork.tsx:58
msgid "A harvester is a service running on a machine where plot(s) are actually stored. A farmer and harvester talk to a full node to see the state of the chain. View your network of connected harvesters below Learn more"
msgstr "Harvester là một dịch vụ chạy trên một  máy chứa các tệp plot  . Một �farmer và harvester tương tác với một nút đầy đủ để xác định trạng thái của chuỗi. Xem các harvester được kết nối của bạn dưới đây Tìm hiểu thêm"

When I use lingui extract it change content of the file to

#: src/components/farm/FarmYourHarvesterNetwork.tsx:58
msgid "A harvester is a service running on a machine where plot(s) are actually stored. A farmer and harvester talk to a full node to see the state of the chain. View your network of connected harvesters below Learn more"
msgstr "Harvester là một dịch vụ chạy trên một  máy chứa các tệp plot  . Một \bfarmer và harvester tương tác với một nút đầy đủ để xác định trạng thái của chuỗi. Xem các harvester được kết nối của bạn dưới đây Tìm hiểu thêm"

As you can see there is an addition \b character that was not in the original file.

Lingui also changes other characters as well and it is not able to parse it anymore after this operation.

Here is my .linguirc file

{
  "catalogs": [{
    "path": "<rootDir>/src/locales/{locale}/messages",
    "include": ["<rootDir>/src"],
    "exclude": ["**/node_modules/**"]
  }],
  "locales": ["da-DK", "de-DE", "en-AU", "en-PT", "en-US", "es-ES", "fi-FI", "fr-FR", "it-IT", "ja-JP", "nl-NL", "pl-PL", "pt-BR", "pt-PT", "ro-RO", "ru-RU", "sk-SK", "sv-SE", "zh-TW", "zh-CN"],
  "format": "po",
  "sourceLocale": "en-US",
  "fallbackLocales": {
    default: "en-US"
  }
}

FYI:
It is not working with all the latest versions of lingui.
This issue is related to #1033 as well.

@stale
Copy link

stale bot commented Jun 21, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jun 21, 2021
@stale stale bot closed this as completed Jun 28, 2021
@seeden
Copy link
Author

seeden commented Jun 28, 2021

Please reopen this issue. It was not fixed

@Martin005
Copy link
Contributor

@seeden Hello, since we have fixed #1033 by updating the Messageformat parser package, that might have fixed your issue as well. Could you please try if the issue still persists on the newest version 3.16.1?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants