bugGNU gettext - Bugs: bug #38501, RFE: add virtual locale XX

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #38501: RFE: add virtual locale XX

Submitter:  Miroslav Suchý <msuchy>
Submitted:  Mon 11 Mar 2013 01:58:54 PM UTC
   
 
Category:  Other Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Mon 05 Nov 2018 06:15:00 PM UTC, comment #2: 

This is also known as pseudo-localization https://en.wikipedia.org/wiki/Pseudolocalization .

Bruno Haible <haible>
Group administrator
Mon 11 Mar 2013 02:37:00 PM UTC, comment #1: 

I am developer an also translator. I know what you mean and It is a great idea. :)

I see a couple of problems, the first with format strings. C printf swallows everything, but other functions an languages can have a runtime check of the parameters passed to the format. So you have to keep them in the translated string.

The other one is that It needs to be a standard name or you will have to create it in each system with localedef.

Also msgxx (like msgen) should be easy to implement with some knowledge about format strings, so there is no need to handle it internally (that would need GNU Libc changes also).

Also a tip, you should execute to test other translations:

env -i LC_ALL=ll_CC [DISPLAY=$DISPLAY] ./my-localised-prog

instead of

LC_ALL=ll_CC ./my-localised-prog

because the LANGUAGE variable has preference, but It needs LC_ALL =! "C", so It could fail in some environments or It may not work as expected.

Miguel Ángel Arruga Vivas <m1gu3l>
Group Member
Mon 11 Mar 2013 01:58:54 PM UTC, original submission:  

Testing if some code is localized can be hard. Because you could not distinguish in UI between
  print "foo"
and
  print ("foo"
where foo is just not yet translated or have the same translation as original string.

What I would like to have is virtual locale XX (or whatever can be taken). This virtual locale would be handled internally by gettext.
And if locale is set to XX, then ("foo") will return ("XXX"), for every string.

With this feature in place I can easily do:
  LC_ALL=XX ./my-localised-prog
and if I see on output or in UI something else than XX I will immediately know that this is string, which developer forgot to localize.

Miroslav Suchý <msuchy>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by haible (Updated the item)
  • -email is unavailable- added by m1gu3l (Posted a comment)
  • -email is unavailable- added by msuchy (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-11-27 haible CategoryNone Other

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code