bugLordsAWar! - Bugs: bug #31137, translated phrases are not being...

 
 

bug #31137: translated phrases are not being converted to utf8

Submitter:  Ben Asselstine <benasselstine>
Submitted:  Sun 26 Sep 2010 04:44:02 PM UTC
   
 
Category:  translation Severity:  3 - Normal
Item Group:  Git Head Status:  None
Privacy:  Public Assigned to:  benasselstine
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 12 Feb 2011 01:51:57 AM UTC, comment #1: 

All translated strings are now being passed through Glib::locale_to_string.

Ben Asselstine <benasselstine>
Group administrator
Sun 26 Sep 2010 04:44:02 PM UTC, original submission:  

A bug was identified on the mailing list:
http://lists.nongnu.org/archive/html/lordsawar-discuss/2010-09/msg00000.html

When translations are provided in Catalan and in other languages, the game can throw an error message something like:

> (lordsawar:26691): glibmm-CRITICAL **:
> unhandled exception (type Glib::Error) in signal handler:
> domain: g_convert_error
> code  : 1
> what  : Invalid byte sequence in conversion input.


This is because a string that isn't utf8 is being passed to a method that expects a utf8 string.

It looks like this in the code:
  if (bonus & ArmyBase::SUBALLCITYBONUS)
    s += String::ucompose(_("%1%2"), s == "" ? " " : " & ",
                          _("Cancel city bonus"));

and needs to be changed to something like:

  if (bonus & ArmyBase::SUBALLCITYBONUS)
    s += String::ucompose(_("%1%2"), s == "" ? " " : " & ",
                          Glib::locale_to_utf8(_("Cancel city bonus")));

The scope of this change is wide, but once it's fixed lordsawar can have more translations.

Ben Asselstine <benasselstine>
Group administrator

 

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

Attach Files:
   
   
Comment:
   

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 benasselstine (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.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-02-12 benasselstine Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code