Closed
Bug 565316
Opened 15 years ago
Closed 15 years ago
extract-po.sh in our localized mini sites does not create message.pot files with a project name and version
Categories
(Websites :: Other, defect)
Websites
Other
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: pascalc, Unassigned)
Details
Attachments
(1 file)
424 bytes,
patch
|
Details | Diff | Splinter Review |
We are not generating po files for browserchoice or campuspeps websites with correct project headers, we have:
"Project-Id-Version: PACKAGE VERSION\n"
While we should have:
"Project-Id-Version: Campus Reps 1.0 \n"
This breaks tools like poedit and using gettext without benefiting from the mainstream toolchain is not good.
Here is a patch for extract-po.sh that will add the missing parameters for Campus Reps (messages.pot and .po files will have to be regenerated as merging only will not work for header changes I think). It also means that in our documentation for new projects we should document that the project name has to be indicated in the script btw.
Stas, can you approve that since this is your script? Thanks
Reporter | ||
Updated•15 years ago
|
Attachment #444880 -
Flags: review?(stas)
Comment 1•15 years ago
|
||
Good call. We should change this. Can you describe how it breaks PoEdit?
I have an idea on how to improve this patch: maybe we could create a new file called config.sh which would look like this:
#!/bin/bash
packagename='Student Reps'
packageversion='1.0'
and then source it in extract-po.sh:
source `dirname $0`/config.sh
xgettext --package-name="$packagename" \
--package-version="$packageversion"
This way going forward, we can safely copy the extract-po.sh script everywhere without having to modify it. Pascal, what do you think?
Reporter | ||
Comment 2•15 years ago
|
||
poedit will pop up an alert box every time you click on 'save' about the file using the default value.
The exact message in the modal dialog is:
messages.po:8: field `Project-Id-Version' still has initial default value
Reporter | ||
Comment 3•15 years ago
|
||
I am ok for your approach btw, although if it needs testing could we use my temporary solution for now? I have two new French localizers that can work on this site precisely tonight :)
Comment 4•15 years ago
|
||
Comment on attachment 444880 [details] [diff] [review]
patch adding project name in extract-po.sh
r67106 has the fixes. I was basing on Pascal's patch and my comment 1.
I created a new POT file and re-initialized the PO files.
Attachment #444880 -
Flags: review?(stas)
Comment 5•15 years ago
|
||
Files in Verbatim updated.
Pascal, can you verify that PoEdit doesn't give errors now?
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 6•15 years ago
|
||
Just tried and PoEdit is happy now, thanks :)
You need to log in
before you can comment on or make changes to this bug.
Description
•