-
Notifications
You must be signed in to change notification settings - Fork 644
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
Extend the use cases demo with translation support #7858
Conversation
e7fc177
to
b14d412
Compare
|
||
By default, the domain used for translations is the name of the CMake target the `.slint` files are targeted with. | ||
Use the `SLINT_TRANSLATION_DOMAIN` target property to override this and use the specified value as domain, instead. | ||
This is useful in build environments where the target name is given and not suitable, such as esp-idf. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is useful in many other case. Not sure if mentioning esp-idf here is worth it. But I guess it doesn't hurt
@@ -42,4 +42,6 @@ export component App inherits Window { | |||
changed height => { | |||
DialogGlobal.window-height = root.height; | |||
} | |||
|
|||
out property <string> trick-to-include-german-umlauts: "äöüÄÖÜ"; // required for translations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sucks 😞
We need a better way to tell the Slint compiler what ranges we include.
Alternatively, we should have the slint compiler look at the bundled string.
Anyway, I guess right now we have to keep that for the example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, we should have the slint compiler look at the bundled string.
Yes indeed.
.github/workflows/nightly_tests.yaml
Outdated
@@ -66,7 +66,7 @@ jobs: | |||
- name: Downgrade cc and ring crate to work around https://github.com/slint-ui/slint/issues/6875 | |||
run: | | |||
cargo update -p ring --precise 0.17.9 | |||
cargo update -p cc --precise 1.1.31 | |||
cargo update -p cc --precise 1.2.16 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need that at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's indeed unrelated and from another change. Oops.
… property This is useful in environments such as esp-idf, where the component name is something awkward like __esp_idf_main or so.
b14d412
to
6a365ee
Compare
No description provided.