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
mark a string for getstrings but don't actually translate #120
Comments
The getstrings feature was contributed by @bauerj |
The Can you elaborate on why the current approach doesn't work for you? I don't really understand why the name can't be translated immediately. |
Maybe I'm missing something. What I'm doing right now is something like this In my UI, I use these names in a number of different ways:
How would you suggest to handle this with the current approach? Note that eg Qt/QML, where I come from and which might introduce some bias, have similar macros (QT_TR_NOOP |
Okay, I understand now. Yes, in that case it would make sense to have a no-op like The corresponding change to https://github.com/marcglasberg/i18n_extension/blob/master/lib/i18n_getstrings.dart#L18 should be trivial. Can you send in a PR that does just that? |
I never contributed to a project so I might need some assistance. Should I first create a branch, make the changes and then create a pull request or should I start with creating a pull request? Or first create a fork? |
Yes, the usual process would be:
See e.g. here for a more detailed rundown. If you don't want to do that yourself, just let me know. It might take a few days until I have time to do it though. |
@bauerj Change is committed (I think :-) ) |
Proposed fix is not sufficient (see comments in #122).
|
I have a number of <name, image> pairs like "apple", "car", "bike", ... and a corresponding image.
I want to be able to use the 'name' in both
When creating the objects, I would like to mark the name for translation (such that it gets picked up by getstrings) but don't do an actual translation. I would like to defer the actual translation to where I use the 'name', like in
"How many %s do you see".i18n.fill([name.plural(100)]
or something along those lines(note: I assume that plural(100) is valid to use after 'how many' but that's another discussion I guess)
I currently use
"apple".version
since I noticed that getstrings scans for i18n, fill, plural but also for version and .allVersions.But I'm sure I'm abusing getstrings here. So a dedicated markForI18n (next to the existing i18n) would be useful IMO.
The text was updated successfully, but these errors were encountered: