Logo Khaganat

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:rc_localisation_traduction [2016/11/17 23:03] Domperssen:rc_localisation_traduction [2021/12/03 18:19] (current) – external edit 127.0.0.1
Line 65: Line 65:
 identifier [Other text value]</code> identifier [Other text value]</code>
  
-If you want to specify new rows or tabs in a string-value, you must use the C '' \ t '' escape sequence for tabs and '' \ n '' for new lines. To write '' \ '' in a string-value, double the backslash: '' \\ ''. To write ''] '' in the string, precede it with a backslash : ''\]''.+If you want to specify new rows or tabs in a string-value, you must use the C ''\t'' escape sequence for tabs and ''\n'' for new lines. To write ''\'' in a string-value, double the backslash: ''\\''. To write '']'' in the string, precede it with a backslash : ''\]''.
  
 <code>identifier1 [tabulation : \This text is tabulated] <code>identifier1 [tabulation : \This text is tabulated]
-identifier2 [New line \ nText on a new line] +identifier2 [New line \nText on a new line] 
-identifier3 [Backslash : \\] +identifier3 [Backslash: \\] 
-identifier4 [A closing hook : \] ]</code>+identifier4 [A closing hook: \] ]</code>
  
 For easier use and maintaining, you can split up the original file into a "series of smaller files". For easier use and maintaining, you can split up the original file into a "series of smaller files".
-This is done by using a pre-processor command in the C-programing language: "#include.+This is done by using a pre-processor command in the C-programing language: "#include".
  
   #include "path/filename.txt"   #include "path/filename.txt"
  
-You can have any number of "include"-commands, you can even have "include"-commands in include files.+You can have any number of "include-commands", you can even have "include"-commands in include files.
 The "path" can be either "absolute" or "relative" to the location of the "master file". The "path" can be either "absolute" or "relative" to the location of the "master file".
  
Line 152: Line 152:
 propertyName : identifier propertyName : identifier
  
-operator : ‘=’+operator: ‘=’
 | ‘!=’ | ‘!=’
 | ‘<’ | ‘<’
Line 159: Line 159:
 | ‘<=’ | ‘<=’
  
-reference : identifier+reference: identifier
  
-textValue : ‘[‘ .* ‘]’</code>+textValue: ‘[‘ .* ‘]’</code>
  
 As in format 1, you can insert "C style" comments in the text, identifier with enclosure marks, and use the include command. As in format 1, you can insert "C style" comments in the text, identifier with enclosure marks, and use the include command.
Line 182: Line 182:
 Example: You have a string with the following replacements(in English): Example: You have a string with the following replacements(in English):
  
-'' Report me ** $ item.da $ $ item.name $ ** " ''+''"Report me ** $ item.da $ $ item.name $ ** "''
  
 And the file will contain the following names: And the file will contain the following names:
Line 192: Line 192:
 If the item is 'hammer', there is no problem. The replacement will give the following result: If the item is 'hammer', there is no problem. The replacement will give the following result:
  
-'' "Report me ** hammer **" ''+''"Report me ** hammer **"''
  
 But for 'l’ échelle', there is an extra space in the result: But for 'l’ échelle', there is an extra space in the result:
  
-'' "Report me ** l’ échelle **" ''+''"Report me ** l’ échelle **"''
  
 To remove this extra space, you can add a 'delete' marker in the article definition, like this: To remove this extra space, you can add a 'delete' marker in the article definition, like this:
Line 220: Line 220:
  
 The server-side translation is a bit more complicated. The server-side translation is a bit more complicated.
-We will see how the server-side translations is done in four steps (We will start with the simplest to the most complicated problems, Yay!).+We will see how the server-side translations is done in four steps(We will start with the simplest to the most complicated problems, Yay!).
 === Step 1: A single string === === Step 1: A single string ===
  
 To "pull this of", you only need the sentence file. To "pull this of", you only need the sentence file.
-Let's say we want a string that says "hello world!", Identified by '' HelloWorld ''+Let's say we want a string that says "hello world!", Identified by ''HelloWorld''
-Let's create a phrase entry in '' phrase_en.txt '':+Let's create a phrase entry in ''phrase_en.txt'':
  
-<code>HelloWorld ()+<code>HelloWorld()
 { {
 [Hello world!] [Hello world!]
Line 236: Line 236:
 Of course, you will also have to provide the same sentence in all supported languages, for example in file phrase_en.txt: Of course, you will also have to provide the same sentence in all supported languages, for example in file phrase_en.txt:
  
-<code>HelloWorld ()+<code>HelloWorld()
 { {
 [Bonjour le monde!] [Bonjour le monde!]
Line 243: Line 243:
 Notice that only the value of the text has changed. The sentence identifier ** MUST ** be the same in all translation files. Notice that only the value of the text has changed. The sentence identifier ** MUST ** be the same in all translation files.
  
-=== Step 2: Workaround for "clause_ <lang> .txt" ===+=== Step 2: Workaround for "clause_<lang>.txt" ===
 In the 4th step, we will see that the file-sentences can become very complex. Therefore is these kind of files not very suitable if you(for example) want to give it to a professional translator without the proficiency in complex file grammatics. Even worse, the complexity of the file may hide the translation work itself. In the 4th step, we will see that the file-sentences can become very complex. Therefore is these kind of files not very suitable if you(for example) want to give it to a professional translator without the proficiency in complex file grammatics. Even worse, the complexity of the file may hide the translation work itself.
  
Line 251: Line 251:
 Let's go back to the previous, above example.. with a "workaround". Let's go back to the previous, above example.. with a "workaround".
  
-In '' phrase_en.txt '', create the sentence entry like this:+In ''phrase_en.txt'', create the sentence entry like this:
 <code>HelloWorld () <code>HelloWorld ()
 { {
Line 257: Line 257:
 }</code> }</code>
  
-As you can see, we only need to put an identifier in the sentence block. This means that the phrase refers to a string identified as '' Hello '' in the clause file.+As you can see, we only need to put an identifier in the sentence block. This means that the phrase refers to a string identified as ''Hello'' in the clause file.
  
-Maintenant, nous pouvons créer la valeur textuelle dans ''clause_en.txt'' :+Now we can create the text value in ''clause_en.txt'':
  
   Hello [Hello world!]   Hello [Hello world!]
Line 266: Line 266:
  
 <WRAP center round tip 80%> <WRAP center round tip 80%>
-To facilitate the translation work, it is possible to specify the string identifier ** AND ** the value identifier. This can be useful for automatically building a translation file from the original file.+To facilitate the translation work, it is possible to specify the string identifier **AND** the value identifier. This can be useful for automatically building a translation file from the original file.
 Exemple : Exemple :
  
Line 273: Line 273:
 Hello [Bonjour le monde!] Hello [Bonjour le monde!]
 }</code> }</code>
 +
 +</WRAP>
  
 In a case like this, the translation system always looks first in the clause file, and then falls back on the text value in the sentence file ONLY if it does NOT find a string in the clause file. In a case like this, the translation system always looks first in the clause file, and then falls back on the text value in the sentence file ONLY if it does NOT find a string in the clause file.
Line 283: Line 285:
 Each sentence can receive a list of parameters. Each sentence can receive a list of parameters.
  
-These parameters can be of different types :+These parameters can be of different types:
   * item, //(object)//   * item, //(object)//
   * place, //(emplacement)//   * place, //(emplacement)//
Line 313: Line 315:
 Each parameter receives a name (or id) from its declaration. We call it paramName. Each parameter receives a name (or id) from its declaration. We call it paramName.
  
-Each type of parameter ** MAY ** be associated with a 'word' file. This file is an excel sheet (in unicode text export format) containing the translation of the parameter: its name, an indefinite or defined article ( 'a', 'le' ...), the plural of the name and The article, and any useful property or grammatical element necessary for translation.+Each type of parameter **MAY** be associated with a 'word' file. This file is an excel sheet (in unicode text export format) containing the translation of the parameter: its name, an indefinite or defined article( 'a', 'le' ...), the plural of the name and The article, and any useful property or grammatical element necessary for translation.
  
 The first column is very important because it associates a data line with a particular value of the parameter. The first column is very important because it associates a data line with a particular value of the parameter.
Line 322: Line 324:
  
 <WRAP center round important 60%> <WRAP center round important 60%>
-NB: The first column ** MUST ** always be the association field and you will need to have a '' name '' column as it is the default value for the parameters. Any other column is optional and can vary from one language to another to match the various specific grammatical constraints.+NB: The first column **MUST** always be the association field and you will need to have a ''name'' column as it is the default value for the parameters. Any other column is optional and can vary from one language to another to match the various specific grammatical constraints.
 </WRAP> </WRAP>
  
Line 547: Line 549:
  
 <WRAP center round info 60%> <WRAP center round info 60%>
-Test to perform cf HexChatlog kerv30/12/2015 - 14:30  --- //[[wiki:user:yannk|Yann K]] 2015/12/30 14:42//+Test to perform cf HexChatlog kerv30/12/2015 - 14:30  --- //[[user:yannk|Yann K]] 2015/12/30 14:42//
 </WRAP> </WRAP>
  
Line 735: Line 737:
 The client receives the phrase and requests any missing element from the string to the IOS. The client receives the phrase and requests any missing element from the string to the IOS.
  
-==== Build a list of parameters send the string ====+==== Build a list of string sending parameters ====
 To access the proxy, you must include ''game_share/string_manager_sender.h'' and link it with ''game_share.lib''. To access the proxy, you must include ''game_share/string_manager_sender.h'' and link it with ''game_share.lib''.
  
Line 946: Line 948:
  
 Exemple: Exemple:
-^ From a mission called ^INSTRUCTEUR_MIS_1+^ From a mission called ^INSTRUCTOR_MIS_1
-| The title will be | INSTRUCTEUR_MIS_1_TITLE +| The title will be | INSTRUCTOR_MIS_1_TITLE 
-| The text of Stage 1 of the mission will be | INSTRUCTEUR_MIS_1_STEP_1 +| The text of Stage 1 of the mission will be | INSTRUCTOR_MIS_1_STEP_1 
-| The text of Stage 2 of the Mission will be | INSTRUCTEUR_MIS_1_STEP_2 +| The text of Stage 2 of the Mission will be | INSTRUCTOR_MIS_1_STEP_2 
-| The end-of-mission text will be | INSTRUCTEUR_MIS_1_END |+| The end-of-mission text will be | INSTRUCTOR_MIS_1_END |
  
 Settings : Settings :
CC Attribution-Share Alike 4.0 International Driven by DokuWiki
en/rc_localisation_traduction.1479423821.txt.gz · Last modified: (external edit)

Licences Mentions légales Accueil du site Contact Inclusion