Re: gnome-photos: String freeze break request (GNOME/gnome-photos!28)

Debarshi Ray <[email protected]>
Newsgroups gmane.comp.gnome.documentation,gmane.comp.gnome.internationalization.general
Message-ID <[email protected]>
Hey Alexandre,

On Fri, Mar 02, 2018 at 10:59:56AM +0100, Alexandre Franke wrote:
> On Thu, Mar 1, 2018 at 9:12 PM, Debarshi Ray <[email protected]> wrote:
>> The strings and accompanying screenshots can be found in this merge
>> request:
>>   https://gitlab.gnome.org/GNOME/gnome-photos/merge_requests/28
>>
> 
> The handling of that parenthesis with a plural form looks dubious to me.
> Are you sure that???s the correct way to do it?

The short answer is that I am now considering using three strings:
 (a) "Select items for import"
 (b) "Select items for import (%u selected)"
 (c) "Select items for import (%u selected)" - plural form of (b)

That would also avoid the need to deal with context-sensitive
ngettext.

The longer answer is that these strings originate from the title of the
generic selection mode [1] header bar. See:
https://gitlab.gnome.org/GNOME/gnome-photos/blob/wip/rishi/import-string-changes-1/src/photos-main-toolbar.c#L71

That pattern was inherited from gnome-documents:
https://git.gnome.org/browse/gnome-documents/tree/src/overview.js#n587

I didn't come up with it, but I assumed that the rationale was to
avoid exposing the <b>...</b> markup to translators. However, I fear
that the composed string has been wrong for right-to-left locales. So,
maybe, the code should compose the parts differently for such locales?

Note that the "%d selected" string used for the selection mode title
is actually wrong in C. It should be "%u selected" because the length
argument is an unsigned int. We can let it slide for 3.28, but that's
the reason I wanted to use a context for the new "%u selected" string
- to avoid mixing up bits from different titles when we fix that bug
[2].

However, on second thoughts, since the new strings under discussion
don't have any markup, it's probably better to avoid any composition
and spell them out.

Cheers,
Rishi

[1] https://developer.gnome.org/hig/stable/selection-mode.html.en
[2] Piotr was asking about it on IRC, but I was AFK.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.