Closed NiMeDia closed 8 years ago
(Please don’t misuse this bug tracker for questions — see http://poedit.net/support for appropriate channels.)
That aside, I simply don’t know what you’re talking about, sorry — there’s no such thing as “default translation for fuzzy entries” anywhere in Poedit. Whatever you’re after is almost certainly answered in the GNU gettext manual, though, so please do have a look at that first.
Ok let me describe the problem a bit more detailed.
If I create a new translation within my aplication module "foo", I call the translation method with the following key:
translate("module_foo<Hello World>");
The use case is that another application module could have the same translation key, but the translation could be different in some languages even with the same base translation.
For new (fuzzy) translation keys poedit sometimes gives me suggested translations (I don't know where they come from, but they are there), in this case it is "Last Login":
So my question basicly is how I could force poedit to take the suggestion from the key itself, with some kind of syntax, or is this simply not possible?
translate("module_foo
”);
That’s insane. For your own sake, go read the gettext manual already and learn about message contexts.
I don't know where they come from
Because you didn’t read the gettext manual, which I’m pretty sure explains how xgettext fills fuzzies, and you didn’t read the descriptions of settings in preferences, both something I’d expect you’d do before creating a bug report.
You can disable it, you can’t affect it.
If something remains unclear after you read about updating and xgettext in the manual, feel free to ask — using appropriate channels, not here.
Sorry to waste your important time, didn't know that github is only a bugtracker (first project so far which doesn't allow questions here, so please excuse my/our way of working)
I've now read the section about fuzzies, text domains and so on. Maybe this issue can't be done by xgettext, but thats not what my question was about, My question was about poedit, which might has this feature on top.
We are not using text domains (or message contexts) to provide some kind of translation chains for keys within our modules.
Anyway, thanks.
(first project so far which doesn't allow questions here, so please excuse my/our way of working)
You’re wrong about that. Plus it’s a bit arrogant to impose your “way of working” on others, instead of checking their way, don’t you think?
My question was about poedit
And I did give you Poedit-specific answer, but it does little good without having some familiarity with gettext.
We are not using text domains (or message contexts)
Yes, obviously. The point was that you should (the latter, which is completely unrelated to the former, and conflating them like this suggests that my recommendation to learn gettext felt on deaf ears). Instead, you’re doing a poor man’s homegrown substitute for contexts, which is the cause of your self-imposed problems in this issue.
Plus it’s a bit arrogant to impose your “way of working” on others, instead of checking their way, don’t you think?
Please see #227, #226, #225, #171, ... just to name some of "us" which have the same way of working.
And I did give you Poedit-specific answer
You said roughly read the docs of some third party library.
... both something I’d expect you’d do before creating a bug report.
It is no bug report, it is an issue. You can create fancy labels to separete bugs from questions, feature requests and other issues. The button I pressed simply isn't called "Create Bug Report". So please excuse the way how github works and that users use it the way it is meant to be used. o.O
Instead, you’re doing a poor man’s homegrown substitute for contexts, which is the cause of your self-imposed problems in this issue.
The problem is that I simply cannot use the message context feature since it doesn't fit within our application structure or use-cases. But again, this wasn't the question at all.
It can't be done, thats all I wanted to know.
just to name some of "us" which have the same way of working.
“There are other inconsiderate and rude people in the world, therefore it is OK when I am rude.” That’s one beautiful gem of reasoning.
Stop being an entitled ass about it and respect clearly communicated ways of working of the OSS projects you’re taking advantage of and asking for help from. It’s the least you could do and the polite thing too.
And I did give you Poedit-specific answer You said roughly read the docs of some third party library.
No. I asked you to acquire some basic competency in the translation system you’re using (not “library”) and then I gave you Poedit-specific answer as well. At least don’t lie.
It is no bug report, it is an issue
It’s not an issue, it’s a (misguided) question. Issues are actionable.
The problem is that I simply cannot use the message context feature since it doesn't fit within our application structure or use-cases.
Buzzwords-laden nonsense — you’re still not quite sure what this “context” thing is (and probably confuse it with domains), otherwise you’d realize you’re already doing the same thing and amazingly, it “fits within your application structure and use-cases”.
But again, this wasn't the question at all.
“How can I make gcc compile my code scanned into a JPEG?” “Don’t. Type it in a text editor.” “But this wasn’t the question at all!”
It’s called solving the root cause and you should try it. So sorry for trying to actually help you in spite of your attitude.
You wouldn’t have to ask your question in the first place if you RTFM first and used gettext competently. Turns out that it is completely trivial to pre-fill English, both in Poedit and with gettext tools, when you use gettext properly. It further turns out that you don’t even need to, because contexts are designed for exactly this situation and work exactly as you want out of the box.
Oh well, not everybody can be helped.
Stop being an entitled ass about it and respect clearly communicated ways of working of the OSS projects you’re taking advantage of and asking for help from. It’s the least you could do and the polite thing too.
As I said, I am sorry for the inconvenience. I simply wasn't at the support site of poedit first.
Furthermore I am sorry for the whole debate, I simply read the fkin manual and I completely agree with you that text domains are the right feature for this, and I know what contexts are and even how they are used.
It further turns out that you don’t even need to, because contexts are designed for exactly this situation and work exactly as you want out of the box.
So tell me how can I achieve multiple message contexts in one translation file with source code parsing? (Thats the use-case) The point is that when I use message contexts within my application, e.g.
translate('Test', 'context1')
translate('Test', 'context2')
Poedit still recognizes it as one translation key, plus it doesn't show the context which is very important because our translators use it to find the right place within the application. (Thats another use-case) So is there some kind of configuration where the parser can recognize the context from? (the second argument of the translation method in this case.) I can only see one configuration for the translation method to be used:
Turns out that it is completely trivial to pre-fill English, both in Poedit and with gettext tools, when you use gettext properly.
Sorry but I can't find anything about it, or do you mean that my source text simply should be in english? (which I can't do, for the reasons above)
I completely agree with you that text domains are the right feature for this, and I know what contexts are and even how they are used.
Again, message contexts and text domains are two orthogonal, completely unrelated things. Repeat after me:
TEXT DOMAINS ARE NOT CONTEXTS.
No, seriously. They really are not and text domains are not “the right feature for this” — they are unrelated.
Simplifying at the cost of slight inaccuracy (a detailed explanation including the motivation can be found, you guessed it, in the GNU gettext manual):
So tell me how can I achieve multiple message contexts in one translation file with source code parsing?
Just use them. Configure the keywords in accordance with the docs in Poedit. Which seems to be the problem here, there’s no translate:1,2c
in your screenshot.
(This non-obvious syntax is explained in GNU gettext manual, but because nobody including me can remember the damn thing, it’s linked to from right this part of Poedit with a “Learn more about gettext keywords” link right under the keywords list. Unfortunately I didn’t know until now that you’re using some very old version of Poedit that doesn’t have it yet. That’s another useful OSS habit: always make sure you’re using the very latest first.)
Poedit still recognizes it as one translation key, plus it doesn't show the context which is very important because our translators use it to find the right place within the application.
Poedit recognizes keywords as what you tell it the keyword is. If you don’t tell it the keyword takes a context argument, it can’t know about it — see above. The context is always shown in Poedit above the source text no matter what. What Poedit doesn’t show is the domain, because it is the same in the entire file by definition, or context that wasn’t extracted.
Sorry but I can't find anything about it, or do you mean that my source text simply should be in english?
Edit → Copy From Source Text and yes, see above.
Thank you so much, it is working now as expected! The damn translate:1,2c thing did it. I still can't find anything obvious about it in the docs, even now that I know what to search for =)
Unfortunately my dev-machine is bound to a fixed set of packages, so it's nearly impossible for me to install the latest version of anything.
This helped a lot, sorry for being rude in this discussion, kinda missunderstood eachother.
update: Currently noticed that the context feature isn't natively supported in PHP :sob: For everyone who is facing the same issue, you can build your own context support -> http://php.net/manual/de/book.gettext.php#89975
Currently noticed that the context feature isn't natively supported in PHP :sob:
That's… wow.
Hello guys, at first I must say you did great work with poedit!
As we are using translation keys with some kind of prefix to separate translations from different software modules, I'd like to ask whether there is a possibility to generate the fuzzy default translated value from the translation key itself, f.e.:
Background of this question is that we like to optimize our translation workflows. With this feature the english translation could be done by the programmer itself and the translation for other languages could be based on the default text. Also part of the question: How does Poedit determine the default translations for fuzzy entries?
Thanks!