! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Problematic plural form
Status:
RESOLVED: FIXED
Product:
Mousepad
Component:
General

Comments

Description Dumitru Moldovan editbugs 2012-05-24 20:57:16 CEST
The following phrase is impossible to localize correctly in some languages, including Romanian:

#: ../mousepad/mousepad-print.c:653
msgid "Number every"
msgstr ""

#: ../mousepad/mousepad-print.c:669
msgid "line(s)"
msgstr ""

Please don't break phrases like that and use GNU's gettext plural extension as in other instances, eg.:

#: ../mousepad/mousepad-replace-dialog.c:445
#, c-format
msgid "%d occurence"
msgid_plural "%d occurences"

Thanks and keep up the good work!
Comment 1 Matthew Brush editbugs 2012-07-02 19:27:08 CEST
It's like that because it has a widget in-between like:

  [ ] Print line numbers
        Number every <GtkSpinButton> line(s)

If you can recommend a way to fix it without having the "line(s)" be changed based on the number in the GtkSpinButton[1], I'll fix it. If I just remove the "(s)" in the "line(s)" it reads incorrectly for the default case where the GtkSpinButton contains 1, like:

  [ ] Print line numbers
        Number every <1> lines

Suggestions needed.

[1] http://developer.gnome.org/gtk/2.24/GtkSpinButton.html
Comment 2 Dumitru Moldovan editbugs 2012-07-04 13:00:48 CEST
As said above, you should use GNU's gettext plural extension as in other instances, eg.:

#: ../mousepad/mousepad-replace-dialog.c:445
#, c-format
msgid "%d occurence"
msgid_plural "%d occurences"

As a translator I expect something like this here:

#, c-format
msgid "Number every %d line"
msgid_plural "Number every %d lines"
Comment 3 Matthew Brush editbugs 2012-07-04 16:27:02 CEST
The problem, as said above, and unlike the other instances where the plural form is used, is that where you have the `%d` is actually a GTK+ widget (GUI control). Not sure if you've looked at where the string occurs in the context of print dialog it's contained in, but if not, it might become more clear what the problem is if you did.

Thanks
Comment 4 Dumitru Moldovan editbugs 2012-07-04 16:43:08 CEST
OK, I see... Then perhaps you could rephrase the string so that the numeral is last. This would unbreak the string and maybe even get rid of the need for plural form. Sorry, I'm not a native English speaker.
Comment 5 Andre Miranda editbugs 2013-10-12 01:24:12 CEST
I could rephrase this, I'm no native English speaker too :D
I looked at some others editors and the only one that has this feature and allows the user to choose the numbering interval is gEdit, just like this:
  [ ] Print line numbers
        Number every <GtkSpinButton> lines

What a coincidence! :D
Well, is it a problem to let the string ending with "lines"?
Besides that, is it a problem to translate to something like "linie(i)" in Romanian?
In Portuguese we do like this:
"Televison(s)" --> "Televisão(ões)"
"Sound(s)" --> "Som(ns)"

Just my 2 cents.
Comment 6 Andre Miranda editbugs 2013-10-12 01:24:42 CEST
(In reply to André Miranda from comment #5)
> I could rephrase this...
s/could/couldn't
Comment 7 Dumitru Moldovan editbugs 2013-10-12 08:41:28 CEST
André, thanks for looking at this. The  workaround in Romanian is:

#: ../mousepad/mousepad-print.c:653
msgid "Number every"
msgstr "Numerotează fiecare al"

#: ../mousepad/mousepad-print.c:669
msgid "line(s)"
msgstr "-lea rând"

which results in: 

    Numerotează fiecare al N-lea rând

This is fine for N > 1. 

Unfortunately, I don't think there is a solution that would be fine for N = 1 in Romanian too because when N=1 we should avoid writing 1 as a number. That's why in Romanian it is fine to write:

     Am 2 mere. (I have two apples.)

but it's wrong to write:

     Am 1 măr. (I have an apple.)

the correct form would be:

     Am un măr.

However, we could tolerate something like:

    Interval de numerotare: 1.

which would be in English:

    Numbering range: 1

or something... My knowledge of English fails me here.
Comment 8 Andre Miranda editbugs 2013-10-12 20:54:43 CEST
(In reply to Mișu Moldovan from comment #7)
> However, we could tolerate something like:
> 
>     Interval de numerotare: 1.
> 
> which would be in English:
> 
>     Numbering range: 1
> 
> or something... My knowledge of English fails me here.

Maybe "Numbering interval: N"?
Well, it's up to Matt how to settle this.
Comment 9 Matthew Brush editbugs 2013-10-26 05:36:53 CEST
I'll go with whatever you guys think is best, I only know about programming languages :)  I can hardly speak English and broken Canadian French let alone to decide about languages I know nothing about.
Comment 10 Andre Miranda editbugs 2013-10-30 03:14:27 CET
Created attachment 5213 
patch

The attached patch is a kludge, but would let the translators happy :)
Well, besides this patch we have the following options:
-Let the label as "line(s)". Some translators must find a workaround.
-Let the label as "lines" as gEdit does.
-Make up a different phrase(as Mișu and I have proposed in this bug).
Comment 11 Andre Miranda editbugs 2013-11-05 00:22:18 CET
@Mișu:
What about something like "Number every [  ] line/lines" in Romanian?
I think this is the least intrusive and easiest way to solve this issue.
Comment 12 Dumitru Moldovan editbugs 2013-11-06 10:48:30 CET
Thanks André!

"Number every [ ] line/lines" would be much better than what we have, but not the perfect solution for Romanian and possibly other languages with fancy singular and plural forms.

The perfect solution would be "Numbering interval: [ ]", AFAICT.

Details in comment #7.
Comment 13 Matthew Brush editbugs 2014-07-12 05:04:01 CEST
Fixed in http://git.xfce.org/apps/mousepad/commit/?id=9525d1f7d7e824286f51ff2111a5a82098d23a39 using "Numbering interval".
Comment 14 Dumitru Moldovan editbugs 2014-07-15 09:28:51 CEST
Thank you Matthew, that looks good… Looking forward to a new Mousepad release!

Bug #8942

Reported by:
Dumitru Moldovan
Reported on: 2012-05-24
Last modified on: 2014-07-15

People

Assignee:
Matthew Brush
CC List:
4 users

Version

Target Milestone:
Mousepad 0.2.x

Attachments

patch (2.00 KB, patch)
2013-10-30 03:14 CET , Andre Miranda
no flags

Additional information