Bug 157780 - s-c-b 4.0 not fully gettextized
s-c-b 4.0 not fully gettextized
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: system-config-bind (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jason Vas Dias
: Translation
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-05-15 05:48 EDT by Ronny Buchmann
Modified: 2007-11-30 17:11 EST (History)
3 users (show)

See Also:
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 01:58:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
patch for po/Makefile (2.75 KB, patch)
2005-05-15 05:48 EDT, Ronny Buchmann
no flags Details | Diff
patch implenting the Makefile change described (5.41 KB, patch)
2005-05-16 11:36 EDT, Ronny Buchmann
no flags Details | Diff
patch for po/Makefile (1.36 KB, patch)
2005-05-18 18:19 EDT, Ronny Buchmann
no flags Details | Diff
patch for NamedConfOptions.py (1.23 KB, patch)
2005-05-18 18:19 EDT, Ronny Buchmann
no flags Details | Diff
patch changing textdomain (5.13 KB, patch)
2005-05-22 06:34 EDT, Ronny Buchmann
no flags Details | Diff
patch changing textdomain (5.18 KB, patch)
2005-05-22 13:20 EDT, Ronny Buchmann
no flags Details | Diff

  None (edit)
Description Ronny Buchmann 2005-05-15 05:48:48 EDT
Created attachment 114394 [details]
patch for po/Makefile
Comment 1 Ronny Buchmann 2005-05-15 05:48:48 EDT
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)
Comment 2 Ronny Buchmann 2005-05-15 05:59:18 EDT
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)
Comment 3 Jason Vas Dias 2005-05-16 08:33:04 EDT
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 .


Comment 4 Ronny Buchmann 2005-05-16 09:16:53 EDT
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
Comment 5 Jason Vas Dias 2005-05-16 09:47:09 EDT
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.

 
Comment 6 Miloslav Trmač 2005-05-16 11:18:43 EDT
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.
Comment 7 Ronny Buchmann 2005-05-16 11:35:06 EDT
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)
Comment 8 Ronny Buchmann 2005-05-16 11:36:10 EDT
Created attachment 114425 [details]
patch implenting the Makefile change described
Comment 9 Ronny Buchmann 2005-05-16 11:38:41 EDT
something the original problem: system-config-bind.pot should be checked in.
Comment 10 Ronny Buchmann 2005-05-16 11:44:30 EDT
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
Comment 11 Jason Vas Dias 2005-05-16 12:50:11 EDT
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 .

Comment 12 Ronny Buchmann 2005-05-16 13:20:23 EDT
> 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)?
Comment 13 Jason Vas Dias 2005-05-16 13:27:21 EDT
 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.
Comment 14 Miloslav Trmač 2005-05-16 13:37:24 EDT
(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.
Comment 15 Jason Vas Dias 2005-05-17 16:20:28 EDT
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

 
Comment 16 Sarah Wang 2005-05-17 21:22:29 EDT
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
Comment 17 Jason Vas Dias 2005-05-17 21:41:54 EDT
system-config-bind.pot has now been added to CVS.
Comment 18 Ronny Buchmann 2005-05-18 12:56:23 EDT
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.
Comment 19 Ronny Buchmann 2005-05-18 18:16:03 EDT
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
Comment 20 Ronny Buchmann 2005-05-18 18:19:04 EDT
Created attachment 114540 [details]
patch for po/Makefile

fixing the report and pot targets
Comment 21 Ronny Buchmann 2005-05-18 18:19:48 EDT
Created attachment 114541 [details]
patch for NamedConfOptions.py
Comment 22 Ronny Buchmann 2005-05-18 18:24:08 EDT
please do an update-po afterwards and commit all .po files
Comment 23 Ronny Buchmann 2005-05-18 18:41:26 EDT
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
Comment 24 Ronny Buchmann 2005-05-18 18:42:41 EDT
Sarah, Bernd can one you of fix this and possibly also move files on
the CVS server (see comment #7 and comment #13)?
Comment 25 Jason Vas Dias 2005-05-18 19:18:47 EDT
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 .
Comment 26 Ronny Buchmann 2005-05-19 08:48:12 EDT
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.
Comment 27 Jason Vas Dias 2005-05-19 09:40:28 EDT
Makefile now checked in with xgettext '-k=' -> '--keyword=' - sorry!
Thanks for your patience also.
Comment 28 Ronny Buchmann 2005-05-22 04:44:19 EDT
please also run update-po and checkin .po files
Comment 29 Ronny Buchmann 2005-05-22 06:34:02 EDT
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!
Comment 30 Ronny Buchmann 2005-05-22 06:44:54 EDT
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
                                  )
Comment 31 Ronny Buchmann 2005-05-22 13:20:03 EDT
Created attachment 114690 [details]
patch changing textdomain

gtk.glade.textdomain() was missing
Comment 32 A S Alam 2006-08-01 01:58:42 EDT
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

Note You need to log in before you can comment on or make changes to this bug.