Hi I am using poedit editor and i am not able to edit the original string column. I want to edit few words on original string column. Thanks in Advance
3 Answers
(Oh well, I'll answer it here as well, for the benefit of the people who may find this post. But you won't like the answer any more than when I replied to you yesterday, when you asked on the Poedit mailing and in personal email to me.)
Short answer is: you can't. Read the introductory sections of the GNU gettext manual -- it explains the basic concepts of gettext translations very well, from both the programmer's and translator's perspectives, and it's clear you don't understand the concept of gettext.
Really, I mean it: please, please, read at the lest the intro part of the manual. The fine folks from the GNU gettext project put a lot of effort into it and if you've spent 5-10 minutes with it, you wouldn't need to ask this question.
Longer version:
Gettext uses text strings (typically in English) in the source code as translation keys. And it has tools to extract the strings and put them into a PO file. This ensures that only strings that are actually used are translated.
Changing the original string (called msgid
-- it really is an ID) makes no sense. You would then have a translation of a string that is never used in the source code and so the translation would be guaranteed to never be used. Way to waste the translator's time, wouldn't it?
Want to "edit a few words"? Edit them in the source code. That's the only way that can ever work with gettext.

- 6,445
- 2
- 28
- 25
-
2Oddly enough poEdit doesn't let you add entries either. I guess they expect developers to edit text files manually always? – NoBugs May 10 '15 at 05:46
-
1@NoBugs: No, but it expects developers to read documentation for the libraries (here: gettext library you use, not Poedit) at least enough to grasp the basic concepts. To be honest, I would also expect you to fully read the answer you are commenting on — I explained above that strings are added to the source code, not manually to the PO file. Seriously, please do read the GNU gettext manual’s introductory parts if this isn’t clear to you. – Václav Slavík May 10 '15 at 09:52
-
@Jiaaro No. Unless you have a messed up workflow (in which case, read GNU gettext manual and change it!), it's just a matter of clicking a button or running a script to update the PO(T) file. It's *fastest and simplest* to do as normal gettext user and very much faster then adding the entry manually (even w/o counting the inevitable typos, hours of debugging of why the string doesn't show up, translators translating it pointlessly etc.). Seriously, just try using gettext as intended, you'll be surprised how convenient and simple the workflow is. – Václav Slavík Aug 04 '15 at 09:43
-
@Jiaaro It's always somebody else's fault, right? That's a dangerous way to think for a programmer. [Always blame your own code first.](http://blog.codinghorror.com/the-first-rule-of-programming-its-always-your-fault/) `xgettext` has been in development for so long that it is near-certain that any unrecognized strings are because *you're doing it wrong* one way or another. Nothing RTFM wouldn't fix. Adding the ability to add strings manually in Poedit would be a crazy workaround for some minor code defects somewhere... (Also, see how you *completely* changed your argument to something else?) – Václav Slavík Aug 04 '15 at 19:48
-
@Jiaaro No "automatic discovery" "re-arranges" the file — Poedit doesn't and competently written script/makefile doesn't. Seriously, you're doing it wrong. – Václav Slavík Aug 06 '15 at 17:48
What Vaclav is saying is very true. If you change the actual source string, the system won't read it.
In Poedit, simply select the string from the long list that you want to edit then you will see that string in the Source Text at the bottom of the screen. Then in the Translation box, enter your preferred wording. Don't forget to include any variable aswell otherwise your change won't work.

- 21
- 1
What Vaclav is saying is very false.
You can change it. Open the file with notepad. Ctrl + F the original text that you want to change. Change it, and then save it. Then open the file with po edit again, and you will see the changed text.

- 115
- 8
-
-1 If you do that you will lose it the next time you update the PO from the sources, and anyway there would be no point as strings modified or added this way won't be used anywhere... – Shautieh Mar 03 '16 at 07:38
-
1Why -1? This answer is so wrong! Even if this change stays in the PO it won't be of any use as gettext uses the source strings as identifiers! – Shautieh Mar 28 '16 at 03:11