FlightGear version check: Difference between revisions

Jump to navigation Jump to search
m
Line 23: Line 23:


[[File:Property-browser-showing-version-info.png|thumb|Property browser showing the <code>/sim/version</code> properties.]]
[[File:Property-browser-showing-version-info.png|thumb|Property browser showing the <code>/sim/version</code> properties.]]
=== translations ===
A critical error dialog should preferably support localized error messages. However, [[PUI]] XML dialogs cannot directly support translations, so we need to emulate that using Property overlays.
{{FGCquote
|1= names/strings would need to be resolved by using translations as an overlay
|2= {{cite web
  | url    = http://forum.flightgear.org/viewtopic.php?p=201721#p201721
  | title  = <nowiki>Re: Multi screen configuration not working</nowiki>
  | author = <nowiki>Hooray</nowiki>
  | date  = Feb 23rd, 2014
  }}
}}
{{FGCquote
|1= There's no C++ code handling that stuff directly - it's  all PropertyList-encoded XML files in $FG_ROOT/Translations - menubar.xml/options.xml etc will typically not contain hard-coded "strings" but rather references that are resolved by loading the proper language.xml as an overlay, i.e. key=value during startup - see locale.xml and
$FG_SRC//Main:
* locale.cxx:191:    // load resource for system messages (translations for fgfs internal messages)
* options.cxx:316:        // $FG_ROOT/data/Translations/string-default.xml
* options.cxx:2310:            // There may be more than one translation line.
|2= {{cite web
  | url    = http://forum.flightgear.org/viewtopic.php?p=201527#p201527
  | title  = <nowiki>Re: Where's translation?</nowiki>
  | author = <nowiki>Hooray</nowiki>
  | date  = Feb 21st, 2014
  }}
}}


=== dialog ===
=== dialog ===

Navigation menu