Patch for i18n
Dan Williams
dcbw at redhat.com
Fri Jan 3 09:08:22 PST 2014
On Fri, 2014-01-03 at 16:09 +0100, Mario Blättermann wrote:
> Am Freitag, 3. Januar 2014, 13:45:37 schrieben Sie:
> > Hi Aleksander,
> >
> > Am Freitag, 3. Januar 2014, 12:19:26 schrieben Sie:
> > > Hey Mario,
> > >
> > > > the project website refers to Freedesktop Bugzilla for sending patches,
> > > > but
> > > > there's no "modemmanager" product...? Doesn't matter, there's a
> > > > developer
> > > > mailing list :)
> > > >
> > > > The i18n stack seems to be setup basically, but 14 translatable strings
> > > > are
> > > > quite poor. Here's the first part of a (probably much bigger) patch to
> > > > get
> > > > more translatable strings. See the attachment.
> > >
> > > Err... I don't think anyone wants to get the ModemManager *logs*
> > > translated... Only user-visible strings should get translated, and
> > > daemon logs shouldn't be. Or am I missing something? Are there other
> > > daemons out there which do that?
> >
> > Agreed, such log entries shouldn't be translated. I wasn't aware of this.
> > The only things I like to translate besides the current policy ones are the
> > UI strings of mmcli in the folder "cli". Could I help out to make them
> > translatable by adding the _() around the strings?
> >
> OK, I couldn't wait ;) In the attachment you'll find the first chunk of an i18n
> patch. I've marked some strings of the mmcli sources for translation,
> ommitting the debug messages (g_debug).
+ g_print (_(" -------------------------\n")
+ _(" Status | connected: '%s'\n")
+ _(" | suspended: '%s'\n")
I would say that we *shouldn't* translate the formatted table output
yet, but instead should add functions that will do the formatting based
on the width of the translated strings, and then do the translations. I
don't think it's going to be easy for translators to keep the table-like
formatting; better to handle that in the code and just have translators
translate strings.
So eventually I'd like to end up with something like:
output (_("Status"), _("connected"), <connected value>);
output (NULL, _("suspended"), <suspended value>);
which would automatically format stuff based on the character length of
the translated strings.
Dan
More information about the ModemManager-devel
mailing list