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

Submitted by:  Miroslav Suchý <msuchy>
Submitted on:  Mon 11 Mar 2013 01:58:54 PM UTC  
 
Category: OtherSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

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:
instead of
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>
Project 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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 27 Nov 2016 01:35:38 AM UTChaibleCategoryNone=>Other

    Back to the top


    Powered by Savane 3.1-cleanup1