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)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: pascalc, Unassigned)

Details

Attachments

(1 file)

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
Attachment #444880 - Flags: review?(stas)
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?
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
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 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)
Files in Verbatim updated. Pascal, can you verify that PoEdit doesn't give errors now?
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Just tried and PoEdit is happy now, thanks :)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: