translation template shouldn't have full path info

Bug #1357607 reported by Leo Arias
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-system-settings (Ubuntu)
Triaged
Low
Unassigned

Bug Description

cmake makes a file in builddir/po/settings.js with all the strings that have a translators comment. When running "make pot", those strings get duplicated into the resulting pot file.

To reproduce:
mkdir builddir
cd builddir
cmake ..
make pot

cat ../po/ubuntu-system-settings.pot | grep settings.js

Revision history for this message
Sebastien Bacher (seb128) wrote :

see also bug #1359267

Changed in ubuntu-system-settings (Ubuntu):
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks, the current pot doesn't seem to have duplicated strings, could you give some specific examples?

Changed in ubuntu-system-settings (Ubuntu):
importance: High → Low
status: Confirmed → Incomplete
Revision history for this message
Leo Arias (elopio) wrote :

From current trunk, see:
$ cat po/ubuntu-system-settings.pot | grep settings.js
http://paste.ubuntu.com/8150268/

If you use a builddir that's not in /tmp/ubuntu-system-settings, like following the steps to reproduce, you will update the pot file as if you have changed something on the source.

Maybe duplicated strings is the wrong description, because the strings appear only once but come from two sources: the right qml file and the wrong js that shouldn't be taken into account when generating the pot:

#: ../plugins/time-date//PageComponent.qml:29
#: /tmp/ubuntu-system-settings/obj-x86_64-linux-gnu/po/settings.js:14
msgid "Time & Date"
msgstr ""

Changed in ubuntu-system-settings (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

I still don't understand the issue, your pastebin doesn't have duplicate and running "make pot" doesn't lead to have the same string listed twice here, can you give an particular example? like "That string" from thatsource.c l25 is listed twice in the pot?

Changed in ubuntu-system-settings (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Sebastien Bacher (seb128) wrote :

the string you listed is listed twice for a good reason, it's in 2 files, in the UI and in a .settings as the name of the panel (that's the one showing as settings.js). Is your issue that it's showing as settings.js rather than "realname.settings"? Why is that an issue?

Revision history for this message
Leo Arias (elopio) wrote :

The string is not duplicated nor listed twice, but it comes from two sources. One of them dependent on the builddir you use, so if you use a different dir from the one the previous commiter used, you will get the pot updated even if you didn't update the source files.

In the example I pasted above:

#: ../plugins/time-date//PageComponent.qml:29
#: /tmp/ubuntu-system-settings/obj-x86_64-linux-gnu/po/settings.js:14
msgid "Time & Date"
msgstr ""

Notice the line:
#: /tmp/ubuntu-system-settings/obj-x86_64-linux-gnu/po/settings.js:14

That line shouldn't be part of the pot.

Now from the root of the project, do:
mkdir builddir
cd builddir
cmake ..
make pot

An notice that the pot will be updated with something like:
-#: /tmp/ubuntu-system-settings/obj-x86_64-linux-gnu/po/settings.js:14
+#: /home/elopio/workspace/canonical/ubuntu-system-settings/trunk/builddir/po/settings.js:14

Revision history for this message
Leo Arias (elopio) wrote : Re: [Bug 1357607] Re: make pot uses strings in builddir/po/settings.js

On Tue, Aug 26, 2014 at 8:53 AM, Sebastien Bacher <email address hidden> wrote:

> the string you listed is listed twice for a good reason, it's in 2
> files, in the UI and in a .settings as the name of the panel (that's the
> one showing as settings.js). Is your issue that it's showing as
> settings.js rather than "realname.settings"? Why is that an issue?

Ah, I didn't know that. I thought we needed only the one coming from the
QML.
So, is there a way for not using the full path to the builddir on the pot?
That's the issue, it will be different for every developer.

Changed in ubuntu-system-settings (Ubuntu):
status: Incomplete → Triaged
summary: - make pot uses strings in builddir/po/settings.js
+ translation template shouldn't have full path info
Revision history for this message
Leo Arias (elopio) wrote :

Thanks Sebastien.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.