Comments (3)
Hey! This behaviour is actualy expected. The example_params.po file contains also sprintf params (e.g., %s
, %d
), and this message format was detected under the hood.
Are you encountering such issue with another file?
As a workaround you can use Tolgee CLI, or our single step import REST API endpoint. It enables you to force specific message format.
Docs for format
option of the CLI: https://tolgee.io/tolgee-cli/project-configuration#format
Single step import endpoint docs: https://tolgee.io/api/do-import
from tolgee-platform.
Yes, the sprintf
variables seem to be picked up and converted just fine. It might be a conflict of two formats being used simultaneously.
Another example is a .po
file consisting of only one message in ICU format.
msgid ""
msgstr ""
"Project-Id-Version: Tolgee 1.0.1\n"
"Report-Msgid-Bugs-To: [email protected] \n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid "welcome"
msgstr "Willkommen, {name}"
Using the single-step endpoint with the PO_ICU
format still gives the same result. The resulting translations ICU token is escaped.
Exporting the same translation with "format":"PO", "messageFormat:"ICU"
however, results as correctly formatted message, same as the input.
msgid ""
msgstr ""
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals = 2; plural = (n !== 1)\n"
"X-Generator: Tolgee\n"
msgid "welcome"
msgstr "Willkommen, {name}"
When I correct the translation value in UI to reflect that the {name}
is a placeholder by removing '
around brackets. Then, the UI reflects that the value is a placeholder and the exported result is the same as before.
So I still think that the import adds unnecessary escape characters around ICU formatted value brackets, resulting in UI not displaying the value properly. The import should result in the final image, not the first one.
from tolgee-platform.
Hey, you're right the new example, you've provided seems like a bug. I have reproduced it 👍
Please let me look into that :)
from tolgee-platform.
Related Issues (20)
- Batch operation "Mark as reviewed" doesn't work as expected
- Main menu (analyze, redesign)
- PO file import doesn't parse double-quotes HOT 1
- simplify setting CDATA custom value for Android HOT 4
- export description with strings as comment for Android HOT 4
- Exporting Android Text with non positional arguments leads to lint warning HOT 4
- Initial user should see demo project & guide
- Error: Cannot resolve reference to bean 'jpaSharedEM_entityManagerFactory' while setting bean property 'entityManager' HOT 4
- Export strings for Compose Multiplatform HOT 6
- How to use Tolgee in a Spring Boot project? HOT 2
- Translations pushed from figma plugin are not treated the same way as when updated manually
- Check duplicate messages HOT 4
- vscode plugin
- Imports are incorrectly marked as conflicting for untranslated keys HOT 1
- Parameter interpolation: In Tolgee Version 5 its variable name is not printing in Vuejs file HOT 5
- Modifying a `REVIEWED`🟢 translation should **automatically** update its state back to `TRANSLATED`🟡 HOT 2
- IDEA: Ability to clone project
- Ability to only update translations and not add new keys in import
- Better default exported JSON file format
- Activity label breaks, when tag added to 0 keys HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tolgee-platform.