L20n/Features/Multilocale resources: Difference between revisions

Jump to navigation Jump to search
no edit summary
(Created page with "== goals == * create index resource files that load proper resource files per locale * store source entities that were used to localize the entities in order to enable tools to r...")
 
No edit summary
Line 4: Line 4:


== example ==
== example ==
 
<pre>
en-US: {
en-US: {
  @import("path/to/fr/resource")
  @import("path/to/fr/resource")
Line 12: Line 12:
  @import("path/to/en/resource")
  @import("path/to/en/resource")
}
}
</pre>


en-US: {
In this case, we keep a list of imports that depend on the locale being used.
  <phone "Phone">
  <address "Address">
}
 
============> for 3way merge


===== for 3way merge =====
<pre>
<phone "Telefon">
<phone "Telefon">
<address "Adres">
<address "Adres">
Line 27: Line 25:
  <address "Address">
  <address "Address">
}
}
</pre>


en-US.lol:
In this case we store entities that have been used as a base for translation. This allows us to compare the source entity from en-US locale with the source entity from translated locale and identify entities that were translated against old version of the string.


<phone "Phone.">
== status ==
<address "Address">


== status ==
So far we decided that we don't want to introduce another block structure into L20n, and we can reuse [[L20n/Features/Conditional_blocks|if in @import]] for the former goal.
 
<pre>
@import("path/to/resource") if (@localeCode=="en-US")
@import("path/to/resource2") if (@localeCode=="pl")
</pre>
 
For the latter purpose we're leaning toward storing some sort of .orig file that contains source entities for the 3way-merge.
 
* gandalf - accepted
* stas - accepted
* pike - ?
Confirmed users
1,016

edits

Navigation menu