Bug 157780
Summary: | s-c-b 4.0 not fully gettextized | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Ronny Buchmann <ronny-rhbugzilla> | ||||||||||||||
Component: | system-config-bind | Assignee: | Jason Vas Dias <jvdias> | ||||||||||||||
Status: | CLOSED RAWHIDE | QA Contact: | |||||||||||||||
Severity: | medium | Docs Contact: | |||||||||||||||
Priority: | medium | ||||||||||||||||
Version: | rawhide | CC: | bgroh, mitr, sarahs | ||||||||||||||
Target Milestone: | --- | Keywords: | Translation | ||||||||||||||
Target Release: | --- | ||||||||||||||||
Hardware: | All | ||||||||||||||||
OS: | Linux | ||||||||||||||||
Whiteboard: | |||||||||||||||||
Fixed In Version: | system-config-bind-4.0.0-44.fc6 | Doc Type: | Bug Fix | ||||||||||||||
Doc Text: | Story Points: | --- | |||||||||||||||
Clone Of: | Environment: | ||||||||||||||||
Last Closed: | 2006-08-01 05:58:42 UTC | Type: | --- | ||||||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||||||
Documentation: | --- | CRM: | |||||||||||||||
Verified Versions: | Category: | --- | |||||||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||||||
Embargoed: | |||||||||||||||||
Attachments: |
|
Description of problem: hm, what do I say /po is almost empty... Version-Release number of selected component (if applicable): 4.0.0-16 I attach a patch for the Makefile to actually do something useful (almost completely copied from anaconda) I think s-c-b should get a proper place in CVS (elvis), it seems you were confused about the CVS servers (elvis.redhat.com(aka i18n.redhat.com) vs. cvs.fedora.redhat.com, sorry I only know the external view of things) I don't understand what the problem is here . All text strings in s-c-b are translatable by gettext, and the Makefile extracts them and writes them to the .pot file OK . 1. Currently, there is nothing "useful" for a po/Makefile to do, as there are no translations for s-c-b yet. All s-c-b can do currently is build its .pot file and .desktop file, which it does correctly . When there are translations, a po/Makefile will be submitted to turn them into .gmo files and install them in /usr/share/locale/... 2. s-c-b is checked into CVS on the host "elvis.redhat.com" , which is the same host as "rhlinux.redhat.com", using the $CVSROOT: :ext:rhlinux.redhat.com:/usr/local/CVS . If it is meant to be checked in somewhere else, please let me know . Oh, I didn't see that the toplevel Makefile generates the pot (a bit unusual I think). I would not recommend to use POTFILES as it puts extra work on you. Please have a look at the patch. to 2 I see s-c-b in system-config-bind/devel/system-config-bind-4.0.0/ and in rpms/system-config-bind/devel/system-config-bind-4.0.0/ It should be directly in system-config-bind. (the .spec too) (the common, devel stuff is for cvs.fedora.redhat.com) When you move it, I'll ask Sarah to add it to the translation status page. (I assume few translators noticed that there is replacement for bindconf) btw, it's really nice to have a working bind configuration tool now Yes, s-c-b-4+ has a slightly different build directory structure. Its Makefile depends on ../common/Makefile.common and hence needs to be in a subdirectory, in accordance with how the modern CVS system operates . I don't want to make a special version of s-c-b that does not use ../common/Makefile.common just for the rhlinux.redhat.com CVS - the version submitted there should the same as that used for the distribution builds . So the directory structure it has currently is required and will remain . As soon as some .po translation files are submitted for a po/Makefile to operate upon, I'll submit a Makefile that will turn them into .gmo files and package them up. Your po/Makefile patch is appreciated and may be useful when there are .po files to package - thank you . There is also a generic Makefile used for this purpose that was in the previous s-c-b version - I removed it because it failed with an error due to lack of .po files. As there are currently no .po files, any po/Makefile that requires them would have problems. Jason, the translators expect that _you_ add (empty) .po files to the elvis CVS; AFAIK they aren't allowed to add new files to CVS at all. rhlinux.redhat.com is for the upstream sources - not the build environment I don't see the point in mixing things up. some issues: * make tar from a cvs.fedora.redhat.com checkout is pointless because there is no subdir * common is redhat internal view from cvs.devel.redhat.com (external is different) * rpm release is for versioning the package, not the sources I'd like to propose the following * put tar and srpm generation in s-c-b-4.0/Makefile * use common/cvs-import.sh to import it to cvs.devel.redhat.com * move s-c-b-4.0 to toplevel s-c-b (in rhlinux.redhat.com) Created attachment 114425 [details]
patch implenting the Makefile change described
something the original problem: system-config-bind.pot should be checked in. comment #6: Miloslav, it seems you are right [ronny@bserv po]$ cvs ci de.po Testing de.po... **** Access allowed: ronny is in ACL for system-config-bind/devel/system-config-bind-4.0.0/po. RCS file: /usr/local/CVS/system-config-bind/devel/system-config-bind-4.0.0/po/de.po,v done cvs server: ERROR: cannot write file /usr/local/CVS/system-config-bind/devel/system-config-bind-4.0.0/po/de.po,v: Permission denied cvs server: Couldn't open rcs file `/usr/local/CVS/system-config-bind/devel/system-config-bind-4.0.0/po/de.po,v': No such file or directory cvs server: cannot remove /usr/local/CVS/system-config-bind/devel/system-config-bind-4.0.0/po/de.po,v: No such file or directory OK, sorry - I didn't know that. Where are these translations CVS requirements documented ? I'll create the empty .po files and see if I can figure out a way to move the system-config-bind/devel/system-config-bind-4.0.0/* files up to system-config-bind . > Where are these translations CVS requirements documented ? I fear they are not documented. My reasoning was building upon common usage (I have a complete checkout of the rhlinux cvs for translations and bug fixing) There are of course also some special cases (like specspo or comps-po) which are not upstream sources but only for translations. Everything else seems to be upstream sources (including translations). > I'll create the empty .po files and see if I can figure out a way to move > the system-config-bind/devel/system-config-bind-4.0.0/* files up to > system-config-bind . Someone whith shell access to rhlinux.redhat.com could be of help here to preserve the history. Maybe Bernd Groh (translation team)? po/*.po files now created. I'm now working on integrating the suggested po/Makefile changes . I really don't see the point in moving everything up two directory levels. This is not simple with CVS . Unless there's a really compelling reason not to do so (like it breaks something) I'd prefer to leave the directory structure as is . RE: Comment #9: system-config-bind.pot should be checked in. Are you sure ? This file is generated from the *.py, .glade, and .desktop source files, with the make command "make pot" . Whenever the source files change, this file may change. I thought like other files generated from source that this should not be a cvs object. (In reply to comment #13) > po/*.po files now created. > > I'm now working on integrating the suggested po/Makefile changes . Thanks. > RE: Comment #9: system-config-bind.pot should be checked in. > Are you sure ? This file is generated from the *.py, .glade, > and .desktop source files, with the make command "make pot" . > Whenever the source files change, this file may change. I > thought like other files generated from source that this > should not be a cvs object. The .pot file is usually in CVS, but I can't think of a reason why it is needed. Perhaps it is just a historical relict from the times the translators could add their translations. Another thing that might not be documented elsewhere: The package maintainer is expected to msgmerge ("make -C po update-po" with the standard gettext makefiles) and commit all .po files after string chages, and to keep the LINGUAS list up-to-date. There is now a fully gettext-ized Makefile in system-config-bind-4.0.0/po/Makefile . It provides all the targets in your Makefile attachment, and some functionality from the /usr/share/gettext/po/Makefile.in.in template - please check it out and let me know of any issues. RHL CVS tag: system-config-bind-4_0_0-16 Is it possible to put .pot file to CVS? The status page on fedora translation project depends on .pot file, and in the future any automation process on merge/reuse/statistic generation etc would also depend on this file. Sarah system-config-bind.pot has now been added to CVS. Jason, only a minor issue: the report target doesn't work for me ("nothing to be done"), same for xx.report, but I have now idea what's wrong. I am closing this bug now, as the translation stuff is fixed. The .pot file is missing strings from .glade due to an error in the Makefile. There is another problem in NamedConfOptions.py \n is not properly escaped. I've also found the problem for c#18: declaring pattern rules as PHONY doesn't seem to work please see the patches for details Created attachment 114540 [details]
patch for po/Makefile
fixing the report and pot targets
Created attachment 114541 [details]
patch for NamedConfOptions.py
please do an update-po afterwards and commit all .po files The permission problem from comment #10 may have a different reason than cvs add Testing de.po... **** Access allowed: ronny is in ACL for system-config-bind/devel/system-config-bind-4.0.0/po. Checking in de.po; /usr/local/CVS/system-config-bind/devel/system-config-bind-4.0.0/po/de.po,v <-- de.po new revision: 1.6; previous revision: 1.5 cvs [server aborted]: could not open lock file `/usr/local/CVS/system-config-bind/devel/system-config-bind-4.0.0/po/,de.po,': Permission denied cvs commit: saving log message in /tmp/cvsPWZSEV Sarah, Bernd can one you of fix this and possibly also move files on the CVS server (see comment #7 and comment #13)? Hi Ronny - please get the latest version from CVS . I've fixed the "report" and "missing" targets in the po/Makefile. The NamedConfOptions.py '\\r'/'\\n's I fixed a couple of days ago and was fixed in the latest CVS version. I tested building the .pot with your suggested -LPython xgettext addition, and without, but "diff" reported no differences, and I checked that the glade strings are in the .pot with the original xgettext command - "grep 'All Options' system-config-bind.pot" . The s-c-b.pot is in CVS now, with the .po files generated from it - check them out to a clean directory. It could have been a bug in the version of gettext you use. xgettext seems to correctly recognize .py files as being Python and .h files as being C . Giving xgettext the "-LPython" or "-LC" arguments makes it treat ALL files as being of that language - the *glade.h file is not Python . I can split up the xgettext commands into two, one for the C, and one for the Python - but again, doing that produced no differences in the generated .pot files . Hi Jason,
the -LPython was left over from a test, sorry. The import change is s/-k=/-k/.
But it may really depend on the xgettext version (mine is gettext-0.14.1-12).
The safest choice may be to use long options like --keyword=.
> I checked that the glade strings are in the .pot with the original
> xgettext command - "grep 'All Options' system-config-bind.pot" .
'All Options' is also in EditDialog.py, you should grep for 'glade',
so system-config-bind.pot (r1.1) is still incomplete.
Thanks for your patience with me.
Makefile now checked in with xgettext '-k=' -> '--keyword=' - sorry! Thanks for your patience also. please also run update-po and checkin .po files Created attachment 114686 [details]
patch changing textdomain
s-c-b still uses bindconf as textdomain
I'm attaching a patch changing this to system-config-bind and fixing the
localedir.
And it has a little fix for the Makefile: invoke ln -s with -f to overwrite
existing links.
Now I get a translation, yeah!
Jason, I have one important request regarding translations: Please don't split strings (i.e. sentences) but use format strings instead. Otherwise a good translation is impossible. For example in BIND.py(172): self.gui.error(_('DNS Configuration Initialisation Error:'), _('Access control list')+ ' "' + acl + '" ' + _('contains a reference to an undefined ACL') + ' "' + e.name + '".',True ) should be: self.gui.error(_('DNS Configuration Initialisation Error:'), _('Access control list "%s" contains a' 'reference to an undefined ACL "%s".') % (acl, e.name), True ) Created attachment 114690 [details]
patch changing textdomain
gtk.glade.textdomain() was missing
hi Ronny, po files for s-c-b are available for translation. Can you please reopen the bug, if you facing any problem. Test with: system-config-bind-4.0.0-44.fc6 |
Created attachment 114394 [details] patch for po/Makefile