Page 1 of 1

Location in the .pot is incorrect

Posted: 16 Aug 2015, 20:06
by kaistian
Poedit has a great feature to look at reference. I use it to find in which setting the words are used since it has an impact on the translation.
I think this is called location in xgettext.

A example from messages.pot

Code: Select all

#: classes/feeds.php:1060 classes/pref/users.php:397
#: classes/pref/feeds.php:640 classes/pref/feeds.php:867
#: classes/pref/feeds.php:1839
msgid "Login"
msgstr ""


But the actual lines is

Code: Select all

$ grep -n Login classes/pref/feeds.php
643:                    placeHolder=\"".__("Login")."\"
880:                    placeHolder=\"".__("Login")."\" disabled=\"1\"
1835:                                   placeHolder=\"".__("Login")."\"


Is it possible to get the locations updated to the correct line numbers?

Re: Location in the .pot is incorrect

Posted: 16 Aug 2015, 22:08
by fox
i don't rebase translations after every code change because well it's too much effort

you can always do that yourself if you work on a translation, just run the script in utils/

however this would also update all translation files so if you plan on merging later only include your .po file in the merge request / git patch

Re: Location in the .pot is incorrect

Posted: 24 Aug 2015, 20:50
by kaistian
Ah, of course.
I just run the 3 xgettext in the script an load the .pot in Poedit.

Thanks.