Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:rc_localisation_traduction [2016/11/17 21:34] – Domperss | en:rc_localisation_traduction [2021/12/03 18:19] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 65: | Line 65: | ||
| identifier [Other text value]</ | identifier [Other text value]</ | ||
| - | If you want to specify new rows or tabs in a string-value, | + | If you want to specify new rows or tabs in a string-value, |
| < | < | ||
| - | identifier2 [New line \ nText on a new line] | + | identifier2 [New line \nText on a new line] |
| - | identifier3 [Backslash : \\] | + | identifier3 [Backslash: \\] |
| - | identifier4 [A closing hook : \] ]</ | + | identifier4 [A closing hook: \] ]</ |
| For easier use and maintaining, | For easier use and maintaining, | ||
| - | This is done by using a pre-processor command in the C-programing language: "# | + | This is done by using a pre-processor command in the C-programing language: "# |
| #include " | #include " | ||
| - | You can have any number of " | + | You can have any number of " |
| The " | The " | ||
| Line 152: | Line 152: | ||
| propertyName : identifier | propertyName : identifier | ||
| - | operator : ‘=’ | + | operator: ‘=’ |
| | ‘!=’ | | ‘!=’ | ||
| | ‘<’ | | ‘<’ | ||
| Line 159: | Line 159: | ||
| | ‘<=’ | | ‘<=’ | ||
| - | reference : identifier | + | reference: identifier |
| - | textValue : ‘[‘ .* ‘]’</ | + | textValue: ‘[‘ .* ‘]’</ |
| 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): | ||
| - | '' | + | '' |
| And the file will contain the following names: | And the file will contain the following names: | ||
| Line 192: | Line 192: | ||
| If the item is ' | If the item is ' | ||
| - | '' | + | ''" |
| But for 'l’ échelle', | But for 'l’ échelle', | ||
| - | '' | + | ''" |
| To remove this extra space, you can add a ' | To remove this extra space, you can add a ' | ||
| 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!", | + | Let's say we want a string that says "hello world!", |
| - | Let's create a phrase entry in '' | + | Let's create a phrase entry in '' |
| - | < | + | < |
| { | { | ||
| [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: | ||
| - | < | + | < |
| { | { | ||
| [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 " | + | === Step 2: Workaround for " |
| 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 " | Let's go back to the previous, above example.. with a " | ||
| - | In '' | + | In '' |
| < | < | ||
| { | { | ||
| Line 257: | Line 257: | ||
| }</ | }</ | ||
| - | 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 '' | + | 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 '' |
| - | Maintenant, nous pouvons créer la valeur textuelle dans '' | + | Now we can create the text value in '' |
| 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!] | ||
| }</ | }</ | ||
| + | |||
| + | </ | ||
| 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, // | * item, // | ||
| * place, // | * place, // | ||
| 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 ' | + | Each type of parameter **MAY** be associated with a ' |
| 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 '' | + | NB: The first column **MUST** always be the association field and you will need to have a '' |
| </ | </ | ||
| Line 463: | Line 465: | ||
| * For the same sentence, each language can provide its own set of conditions and clauses to adapt to its grammatical needs. | * For the same sentence, each language can provide its own set of conditions and clauses to adapt to its grammatical needs. | ||
| - | ==== List of properties | + | ==== Property-list |
| Here you will find an exhaustive list of the properties of the hard-coded parameters. | Here you will find an exhaustive list of the properties of the hard-coded parameters. | ||
| These properties are always available even when no word file has been provided. | These properties are always available even when no word file has been provided. | ||
| Line 478: | Line 480: | ||
| | Tribe | | | | Tribe | | | ||
| | Guild | | | | Guild | | | ||
| - | | Player | "name : nom du joueur | + | | Player | "name : Player name | |
| - | | ::: | gender : genre du joueur dans le miroir" | | + | | ::: | gender : Kind of the player in the mirror" | |
| - | | Bot | " | + | | Bot | " |
| - | | ::: | role : rôle du bot tel que défini dans | + | | ::: | role : Role of the bot as defined in creature.basics.chatProfile | |
| - | | ::: | name : nom de la créature | + | | ::: | name : Name of the creature |
| - | | ::: | gender : genre de la créature | + | | ::: | gender : Creature type (drawn?) From the model" | |
| | Integer | | | | Integer | | | ||
| | Time | | | | Time | | | ||
| | Money | | | | Money | | | ||
| | Compass | | | | Compass | | | ||
| - | | dyn_string_id | Seuls les tests != et == sont possibles. Essentiellement pour comparer un paramètre avec 0. | | + | | dyn_string_id | Only tests != and == Are possible. Essentially to compare a parameter with 0. | |
| - | | string_id | Seuls les tests != et == sont possibles. Essentiellement pour comparer un paramètre avec 0. | | + | | string_id | Only tests != and == Are possible. Essentially to compare a parameter with 0. | |
| - | | self | "name : nom du joueur | + | | self | "name : Player name | |
| - | | ::: | gender : genre du joueur dans le miroir" | | + | | ::: | gender : Kind of the player in the mirror" | |
| - | | creature_model | NB : utiliser le fichier de traduction | + | | creature_model | NB : Use the creature_words |
| - | | entity | "== 0, != 0 : teste si l' | + | | entity | "== 0, != 0 : Tests whether the entity is Unknown (unknown) or not | |
| - | | ::: | name : nom de la créature ou nom du joueur | + | | ::: | name : Name of the creature or name of player |
| - | | ::: | gender : genre de la créature | + | | ::: | gender : Creature type (drawn?) Of the player's model or gender (based on player |
| | bodypart | | | | bodypart | | | ||
| | score | | | | score | | | ||
| Line 503: | Line 505: | ||
| | bot_name | | | | bot_name | | | ||
| - | ===== Workflow | + | ===== Translation |
| - | Dans le worklow de traduction ci-dessous, nous considérons que la langue de référence est l' | + | In the translation workflow below, we consider that the reference language is English. |
| - | Il y a une série d' | + | There is a series of tools and beats files to help synchronize translations. Here is a step-by-step |
| - | Seuls les ajouts aux fichiers de traduction existants sont supportés par les outils de traduction. Si vous souhaitez modifier ou supprimer une chaîne ou une phrase | + | Only additions to existing translation files are supported by the translation tools. If you want to edit or delete an existing translation string or phrase, |
| - | Dans la plupart des cas, il vaut mieux créer une nouvelle entrée de traduction, plutôt que de gérer une modification dans tous les fichiers de traduction, et il est à peu près sûr de laisser les vieilles chaînes inutilisées dans les fichiers. | + | In most cases, it is better to create a new translation entry, rather than manage a change in all translation files, and it is almost safe to leave the old unused strings in the files. |
| - | En tous cas, vous ne devez **JAMAIS** faire de modifications quand il y a des fichiers | + | In any case, you must ** NEVER ** make changes when there are pending |
| <WRAP center round important 60%> | <WRAP center round important 60%> | ||
| - | Il est fortement recommandé de respecter scrupuleusement le workflow | + | It is strongly recommended that you strictly follow the described |
| </ | </ | ||
| - | Le travail de traduction se fait en collaboration | + | The translation work is done in collaboration |
| - | L' | + | The tool that generates the diff file for translation keeps the comments of the reference |
| - | De plus, pour le fichier de phrases, le fichier | + | In addition, for the sentences file, the diff file automatically includes comments that describe the parameter list. |
| <WRAP center round important 60%> | <WRAP center round important 60%> | ||
| - | Par défaut il semble que le système travaille avec des fichiers | + | By default it seems that the system works with ISO-8859-15 |
| </ | </ | ||
| - | ==== Structure | + | ==== Structure |
| - | Tous les fichiers à traduire sont stockés dans une structure | + | All files to be translated are stored in a well-defined directory |
| - | Des outils sont fournis pour installer le fichier traduit dans le client et le répertoire du serveur après la fin du cycle de traduction. | ||
| - | * '' | + | Tools are provided to install the translated |
| - | * '' | + | |
| - | * '' | + | |
| - | * '' | + | |
| - | * '' | + | |
| - | * '' | + | |
| - | ==== Traduction des noms de bot ==== | + | * '' |
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| - | La commande | + | ==== Name translation of bots ==== |
| + | |||
| + | The command | ||
| <WRAP center round info 60%> | <WRAP center round info 60%> | ||
| - | Test à effectuer | + | Test to perform |
| </ | </ | ||
| - | ==== Chaîne statique sur le client ==== | + | ==== Static string on the client ==== |
| - | === Tâche initiale | + | === Initial task === |
| - | **Editeur | + | **Editor |
| - | * Créer le fichier de référence | + | * Create the reference file '' |
| - | * Générer les fichiers | + | |
| - | * Envoyer les fichiers | + | |
| - | + | ||
| - | **Traducteur : ** | + | |
| - | * Traduire les fichiers diff. | + | |
| - | * Les renvoyer à l' | + | |
| - | + | ||
| - | **Editeur : ** | + | |
| - | * Mettre les fichiers diff traduits dans le répertoire '' | + | |
| - | * Fusionner les fichiers diff traduits à l'aide de la commande '' | + | |
| - | Une fois la tâche initiale terminée, le workflow entre en mode incrémental. | + | **Translator: |
| + | * Translate diff files. | ||
| + | * Return them to the editor. | ||
| - | === Tache incrémentale === | + | **Editor: |
| - | **Editeur** | + | * Put the translated diff files in the '' |
| - | * Ajouter des chaînes dans le fichier de référence | + | * Merge diff files translated using the '' |
| - | * Générer les fichiers diff de chaînes statiques avec la commande | + | |
| - | * Envoyer les fichiers diff au traducteur. | + | |
| - | **Traducteur** | + | After the initial task is completed, the workflow enters incremental mode. |
| - | * Traduire les fichiers diff. | + | |
| - | * Les renvoyer à l' | + | |
| - | **Editeur** | + | === Incremental spot === |
| - | * Déposer les fichiers diff traduits dans le répertoire | + | **Editor** |
| - | * Fusionner les fichiers | + | |
| + | | ||
| + | * Send diff files to the translator. | ||
| - | ==== Chaînes dynamiques sur le serveur ==== | + | **Translator** |
| - | === Tâche initiale === | + | * Translate |
| - | **Editeur** | + | * Return them to the editor. |
| - | * Créer le fichier de référence '' | + | |
| - | * Générer les fichiers de phrase diff avec la commande '' | + | |
| - | * Traduire le fichier de phrases diff. Ceci implique de bonnes connaissances de la structure grammaticale de chaque langue pour s' | + | |
| - | * Fusionner le fichier diff traduit à l'aide de la commande '' | + | |
| - | * Générer le fichier de clauses diff avec la commande '' | + | |
| - | * Envoyer les fichiers de clauses diff au traducteur. | + | |
| - | **Traducteur** | + | **Editor** |
| - | * Traduire les fichiers de clauses | + | * Deposit the translated |
| - | * Les renvoyer à l'éditeur. | + | |
| - | **Editeur** | + | ==== Dynamic strings on the server ==== |
| - | * Déposer les fichiers de clause diff traduits dans le répertoire | + | === Initial task === |
| - | * Fusionner les fichiers de clause | + | **Editor** |
| + | * Create the reference file '' | ||
| + | * Generate | ||
| + | | ||
| + | * Merge the translated | ||
| + | * Generate the diff clauses file with the command | ||
| + | * Send the diff clauses files to the translator. | ||
| - | Une fois la tâche initiale accomplie, le workflow entre en mode incrémental. | + | **Translator** |
| + | * Translate clauses files diff. | ||
| + | * Return them to the editor. | ||
| + | **Editor** | ||
| + | * Deposit translated diff files in the '' | ||
| + | * Merge the diff clause files with the command '' | ||
| - | === Tache incrémentale === | + | Once the initial task has been completed, the workflow enters incremental mode. |
| - | **Editeur** | + | |
| - | * Ajouter la nouvelle phrase dans '' | + | |
| - | * Générer les fichiers de phrase diff avec la commande '' | + | |
| - | * Traduire le fichier de phrase diff. Ceci implique de bonnes connaissances de la structure grammaticale de chaque langue pour s' | + | |
| - | * Fusionner les fichiers diff traduits à l'aide de la commande '' | + | |
| - | * Générer les fichiers de clauses diff avec la commande '' | + | |
| - | * Envoyer les fichiers de clause diff au traducteur. | + | |
| - | **Traducteur** | + | === Incremental spot === |
| - | | + | **Editor** * |
| - | * Les renvoyer à l'éditeur. | + | * Add the new sentence to '' |
| + | * Generate diff phrase files with the command '' | ||
| + | * Translate the diff file. This implies a good knowledge of the grammatical structure of each language to adapt to the rules of selection of the clauses. | ||
| + | * Merge diff files translated using the command '' | ||
| + | | ||
| + | * Send the diff clause files to the translator. | ||
| - | **Editeur** | + | **Translator** |
| - | * Déposer les fichiers de clause | + | * Translate clauses files diff. |
| - | * Fusionner les fichiers de clause | + | * Return them to the editor. |
| + | **Editor** | ||
| + | * Deposit translated | ||
| + | | ||
| - | ==== Fichiers de mot côté serveur | + | ==== Server-side word files ==== |
| <WRAP center round important 60%> | <WRAP center round important 60%> | ||
| - | <fs x-large>Cette partie est obsolète.</ | + | <fs x-large> |
| - | Il faut désormais recourir à des outils également, comme pour les autres: | + | We must now also use tools, as for others: |
| https:// | https:// | ||
| Line 633: | Line 634: | ||
| 3. Open files in " | 3. Open files in " | ||
| 4. Replace original text with translation (separators are < | 4. Replace original text with translation (separators are < | ||
| - | 5. The 2 last lines : REMOVE THE FOLOWING | + | 5. The 2 last lines : REMOVE THE FOLLOWING |
| 6. Save files | 6. Save files | ||
| 7. Launch 6_merge_words_diff to merge your translations in " | 7. Launch 6_merge_words_diff to merge your translations in " | ||
| Line 641: | Line 642: | ||
| <WRAP center round important 60%> | <WRAP center round important 60%> | ||
| - | NB : ‘mot’ | + | NB: ' |
| </ | </ | ||
| - | Les fichiers de mots sont toujours mis à jour à la main parce qu'ils sont rarement mis à jour par l' | + | Word files are always updated manually because they are rarely updated by the editor(and usually only for large updates). In addition, when new sentences are translated, it may be necessary to create and fill a new column in one of the word files to fit the translation. |
| - | Il y a donc juste un workflow, | + | So there' |
| - | === Taches initiales | + | === Initial tasks === |
| - | **Editeur** | + | **Editor** |
| - | * Créer la feuille initiale pour chaque | + | * Create the initial sheet for each parameter |
| - | * Créer et remplire les colonnes par défaut | + | |
| - | * Créer les feuilles pour toutes les langues en copiant les feuilles de la langue de référence. | + | |
| - | * Créer et remplir toutes les colonnes de bases dépendantes de la langue. | + | |
| - | * Envoyer toutes les feuilles au traducteur. | + | |
| - | **Traducteur** | + | **Translator** |
| - | * Traduire toutes les feuilles dans toutes les langues, en ajoutant éventuellement toutes les colonnes nécessaires. | + | |
| - | * Renvoyer les feuilles traduites à l' | + | |
| - | * Garder une copie des feuilles traduites comme référence pour la traduction des phrases et des clauses. | + | |
| - | **Editeur** | + | **Editor** |
| - | * Déposer les feuilles traduites dans le répertoire | + | |
| - | Après cette tache initiale, il y a deux événements possibles | + | After this initial task, there are two possible events: |
| - | == Besoin d'une nouvelle colonne | + | == Need a new column |
| - | **Traducteur** | + | **Translator** |
| - | * Au moment de traduire un diff de phrase ou de clause, | + | |
| - | * Définir les colonnes nécessaires. | + | |
| - | * Contacter l' | + | |
| - | * Ajouter les nouvelles colonnes et les remplir dans les feuilles | + | |
| - | * Envoyer les feuilles à l' | + | |
| - | **Editeur** | + | **Editor** |
| - | * Déposer les nouvelles feuilles dans le répertoire | + | |
| - | == Nouveau contenu de feuilles | + | == New sheet contents |
| - | **Editeur** | + | **Editor** |
| - | * Le nouveau contenu de jeu est à intégrer dans le jeu. | + | |
| - | * Contacter le traducteur pour vérifier qu' | + | |
| - | * Créer de nouvelles feuilles pour le langage de référence, et ne contenant que le nouveau contenu. | + | |
| - | * Ajouter et remplir les colonnes par défaut pour les nouvelles feuilles | + | |
| - | * Créer les nouvelles feuilles pour toutes les langues en copiant les feuilles de la langue de référence. | + | |
| - | * Ajouter toutes les colonnes pour respecter le format | + | |
| - | * Envoyer les nouvelles feuilles au traducteur. | + | |
| + | **Translator** | ||
| + | * Translate the new sheets. | ||
| + | * Add new sheets to the end of existing sheets. | ||
| + | * Send the merge result to the editor. | ||
| + | * Keep the result of the merge for reference for the translation of sentences and clauses, and future additions of content. | ||
| - | **Traducteur** | + | **Editor** |
| - | * Traduire les nouvelles feuilles. | + | |
| - | * Ajouter les nouvelles feuilles à la fin des feuilles existantes. | + | |
| - | * Envoyer le résultat de la fusion à l'éditeur. | + | |
| - | * Conserver le résultat de la fusion pour référence pour la traduction des phrases et des clauses, et les futurs ajouts de contenu. | + | |
| - | **Editeur** | + | ==== Install |
| - | * Déposer les nouvelles feuilles dans le répertoire '' | + | At the end of a translation cycle, the translated files must be installed in the client and server directory structures. |
| - | ==== Installer les fichiers traduits ==== | + | To do this, we use the command '' |
| - | A la fin d'un cycle de traduction, il faut installer les fichiers traduits dans les structures d'annuaire du client | + | The '' |
| + | All other files are copied to '' | ||
| - | Pour cela, on utilise la commande '' | + | To apply the translation to the client, the publisher must make a patch. |
| - | Les fichiers ''< | + | |
| - | Tous les autres fichiers sont copiés dans '' | + | |
| - | Pour appliquer la traduction sur le client, l'éditeur doit faire un patch. | + | To apply the translation to the server, just enter the '' |
| - | Pour appliquer la traduction sur le serveur, il faut juste entrer la commande '' | + | ===== Working with translation files, from the point of view of the programr ===== |
| + | NeL / Ryzom programmers can use the translation system with a restricted number of calls. | ||
| - | ===== Travailler avec des fichiers de traduction, du point de vue du programmeur ===== | + | ==== Accessing static client chains |
| - | Les programmeurs NeL/Ryzom peuvent utiliser le système de traduction avec un nombre d'appels restreint. | + | To get the unicode string from an identifier string, use the class '' |
| - | ==== Accéder aux chaînes statiques du client ==== | + | First, make sure that the translation files '' |
| - | Pour obtenir la chaîne unicode à partir d'une chaîne d' | + | |
| - | Tout d' | + | Then, it is possible to load a set of language strings by calling |
| - | Ensuite, il est possible de charger un ensemble de chaînes de langue en appelant | + | The '' |
| + | Then, call the method | ||
| + | ==== Dynamic Chains ==== | ||
| + | A dynamic string requires a little more work and a complete instance infrastructure. | ||
| - | Le paramètre '' | + | Dynamic String Management involves a query service // |
| - | Ensuite, appeler la méthode '' | + | |
| - | + | ||
| - | ==== Chaînes dynamiques ==== | + | |
| - | Une chaîne dynamique nécessite un peu plus de travail et une infrastructure d' | + | |
| - | + | ||
| - | La gestion des chaînes dynamiques implique un service | + | |
| {{ : | {{ : | ||
| - | RQS est un service | + | RQS is a service |
| - | RQS envoie également l' | + | RQS also sends the dynamic string identifier to the client |
| - | Le proxy est un petit morceau de code qui construit et envoie le message de PHRASE | + | The proxy is a small piece of code that builds and sends the PHRASE |
| - | IOS a la lourde charge de parser | + | IOS has the heavy burden of parsing(parsing) the parameters, choosing the right clause |
| - | Le client | + | The client |
| - | ==== Construire une liste de paramètres en envoyer la chaîne | + | ==== Build a list of string sending parameters |
| - | Pour accéder au proxy, | + | To access the proxy, |
| - | Il faut d' | + | The list of parameters must first be constructed. This is done by filling a vector of '' |
| - | Il FAUT respecter exactement la définition des paramètres de phrase du fichier de phrases. | + | You must respect exactly the definition of the sentence parameters of the sentence file. |
| - | On peut alors appeler | + | We can then call: |
| < | < | ||
| NLMISC:: | NLMISC:: | ||
| const std::string & | const std::string & | ||
| const std:: | const std:: | ||
| + | '' | ||
| - | '' | + | This function returns the dynamic |
| - | + | ||
| - | Cette fonction renvoie l'ID dynamique attribué à cette phrase. | + | |
| - | Exemple | + | Example: send the phrase |
| - | <code>// | + | <Code> // include the definition of the proxy string manager |
| - | # | + | # |
| uint32 killCreatureMessage( | uint32 killCreatureMessage( | ||
| Line 768: | Line 766: | ||
| STRING_MANAGER:: | STRING_MANAGER:: | ||
| - | // d' | + | // First, we need the race of the creature |
| param.Type = STRING_MANAGER:: | param.Type = STRING_MANAGER:: | ||
| param.Enum = race; | param.Enum = race; | ||
| params.push_back(param); | params.push_back(param); | ||
| - | // ensuite, le nombre de créatures à tuer | + | // Then the number of creatures to kill |
| param.Type = STRING_MANAGER:: | param.Type = STRING_MANAGER:: | ||
| param.Int = nbToKill; | param.Int = nbToKill; | ||
| params.push_back(param); | params.push_back(param); | ||
| - | // et maintenant, envoyer le message | + | // And now send the message |
| uint32 dynId = STRING_MANAGER:: | uint32 dynId = STRING_MANAGER:: | ||
| destClient, | destClient, | ||
| Line 787: | Line 785: | ||
| }</ | }</ | ||
| - | ==== Membre à remplir dans TParam | + | ==== Member to fill in TParam |
| - | * item: Remplit le SheetId | + | |
| - | * place: Remplit l' | + | |
| - | * creature: Remplit | + | |
| - | * skill: Remplit | + | |
| - | * ecosystem: Remplit | + | |
| - | * race: Remplit | + | |
| - | * brick: Remplit | + | |
| - | * tribe: pas encore défini | + | |
| - | * guild: pas encore défini | + | |
| - | * player: Remplit | + | |
| - | * bot: Remplit | + | |
| - | * integer: Remplit | + | |
| - | * time: Remplit | + | |
| - | * money: Remplit | + | |
| - | * compass: pas encore défini | + | * Compass: not yet defined |
| - | * dyn_string_id: Remplit | + | |
| - | * string_id: Remplit | + | |
| - | * creature_model: Remplit | + | |
| - | * entity: Remplit | + | |
| - | * body_part: Remplit | + | |
| - | * score: Remplit | + | |
| - | * sphrase: Remplit | + | |
| - | * characteristic: Remplit | + | |
| - | * damage_type: Remplit | + | |
| - | * bot_name: Remplit | + | |
| - | * literal: Remplit | + | |
| + | ==== Accessing dynamic strings from the client ==== | ||
| + | On the client side, accessing dynamic strings is quite simple. You just have to watch out for the delay in some cases. | ||
| - | ==== Accéder aux chaînes dynamiques depuis le client ==== | + | Once the dynamic string identifier is retrieved from anywhere(for example, from the database), you just have to probe(pol?) The '' |
| - | Côté client, accéder aux chaînes dynamiques est assez simple. Il faut juste faire attention au délai de transmission dans certains cas. | + | |
| - | Une fois l' | + | The method returns false as long as ((N.d.T.: The original text says " |
| - | La méthode renvoie faux tant que((N.d.T. : le texte d' | + | Even if the method returns false, it can bring back a partial text, with missing replacement text. |
| - | Même si la méthode renvoie faux, elle peut ramener un texte partiel, avec du texte de remplacement manquant. | + | Dynamic strings are dynamically stored, and if the code is smart enough, it can free memory from dynamic strings when they are no longer needed by calling '' |
| - | Les chaînes dynamiques sont stockées dynamiquement, et si le code est suffisamment intelligent, il peut libérer la mémoire des chaînes dynamiques quand celles-ci ne sont plus utiles en appelant | + | To be more efficient, it is possible to call each frame() the getDynString method until it returns true, then store the string and call '' |
| - | Pour être plus efficace, on peut appeler chaque cadre(((NDT : each frame ?)) la méthode '' | + | '' |
| - | + | ||
| - | '' | + | |
| Voici un exemple de code simple. | Voici un exemple de code simple. | ||
| - | < | + | < |
| #include “string_manager_client.h” | #include “string_manager_client.h” | ||
| using namespace STRING_MANAGER; | using namespace STRING_MANAGER; | ||
| - | /** Une méthode qui reçoit l' | + | / ** A method that receives the dynamic string identifier |
| - | * et qui imprime la chaîne dynamique dans le log. | + | * And prints the dynamic string in the log. |
| - | * L' | + | * Call it to each frame / frame until true value |
| - | */ | + | * / |
| bool foo(uint32 dynStringId) | bool foo(uint32 dynStringId) | ||
| { | { | ||
| Line 861: | Line 858: | ||
| }</ | }</ | ||
| - | ===== Guide de création de texte pour Ryzom ===== | + | ===== Text creation guide for Ryzom ===== |
| - | Il y a beaucoup de places | + | There are plenty of places |
| - | ==== Conventions | + | ==== Conventions |
| - | === Identifiants de chaînes dans en.uxt === | + | === String identifiers in en.uxt === |
| - | Ces identifiants sont écrits en minuscule, avec une majuscule pour chaque nouveau mot. | + | These identifiers are written in lowercase, with a capital letter for each new word. |
| Exemple: | Exemple: | ||
| - | | + | |
| - | | + | |
| - | === Identifiants de phrases dans phrase_en.txt === | + | === Identifiers of sentences in phrase_en.txt === |
| - | Ces identifiants sont écrits en majuscules, et les mots sont séparés par “underscore”. | + | These identifiers are written in uppercase, and the words are separated by "underscore". |
| - | Exemple: | + | Example: |
| - | | + | UN_IDENTIFIER_SIMPLE |
| - | | + | UN_OTHER_IDENTIFIER |
| - | === Identifiants de chaînes | + | === Identifiers of strings(or clauses) |
| - | Ces identifiants sont écrits comme des identifiants de chaîne dans '' | + | These identifiers are written as string identifiers in '' |
| - | Mais, comme ils sont à l' | + | But, as they are inside a sentence definition, they must contain the name of the phrases |
| - | Exemple, dans une phrase appelée | + | Example, in a sentence called |
| - | | + | anPhraseSimple |
| - | De plus, lorsqu' | + | In addition, when there is more than one clause |
| - | Exemple, dans une phrase nommée | + | Example, in a sentence named '' |
| - | | + | |
| - | | + | |
| - | ==== Contextes des textes | + | ==== Contexts of the texts ==== |
| - | === Contexte “Chat” === | + | === Context "Chat" |
| - | Le contexte “Chat” englobe tous les textes qui viennent d'un PNJ via une fenêtre de chat et des bulles de texte. | + | The "Chat" context encompasses all texts that come from an NPC via a chat window and text bubbles. |
| - | == Le bot dit/crie en alentours | + | == The bot says / shouts in the neighborhood |
| - | Il n'y a qu'un paramètre disponible | + | There is only one parameter available: the NPC entity that speaks/cries. |
| - | Le nom de la phrase commence par '' | + | The sentence name starts with '' |
| - | Exemple de phrase | + | Sample sentence: |
| < | < | ||
| { | { | ||
| - | | + | |
| }</ | }</ | ||
| - | == Le bot parle au chef de l' | + | == The bot talks to the escort leader |
| - | Deux paramètres | + | Two parameters: the talking |
| - | Le nom de la phrase commence par '' | + | The sentence name starts with '' |
| - | Exemple de phrase | + | Sample sentence: |
| < | < | ||
| { | { | ||
| - | | + | |
| }</ | }</ | ||
| - | == Le bot parle/crie en réponse à un clic sur lui == | + | == The bot speaks/cries in response to a " |
| - | Deux paramètres | + | Two parameters: the bot clicked and the player. |
| - | Le nom de la phrase commence par '' | + | The sentence name starts with '' |
| - | Exemple de phrase | + | Sample sentence |
| < | < | ||
| { | { | ||
| - | | + | |
| } | } | ||
| </ | </ | ||
| - | === Contexte interactif | + | === Interactive context |
| - | Le botchat | + | The botchat |
| - | == Phrases liées aux missions == | + | == Sentences related to missions == |
| - | **Missions statiques** | + | ** Static missions |
| - | Tous les noms de phrases liées à des missions ont une racine définie par le nom de la mission | + | All mission-related sentence names have a root defined by the name of the mission as positioned in the mision |
| - | A partir de cette racine, plusieurs | + | From this root, several |
| - | * _TITLE : pour le titre de la mission | + | |
| - | * _STEP_X : pour le texte de l' | + | |
| - | * _END : pour le texte de fin de mission. | + | |
| Exemple: | Exemple: | ||
| - | ^ A partir d' | + | ^ From a mission |
| - | | Le titre sera | INSTRUCTEUR_MIS_1_TITLE | + | | The title will be | INSTRUCTOR_MIS_1_TITLE |
| - | | Le texte de l' | + | | The text of Stage 1 of the mission |
| - | | Le texte de l' | + | | The text of Stage 2 of the Mission will be | INSTRUCTOR_MIS_1_STEP_2 |
| - | | Le texte de fin de mission | + | | The end-of-mission |
| - | Paramètres | + | Settings |
| - | * XXXXXXX_TITLE (bot b, player p) | + | |
| - | * b est le bot à qui le joueur parle | + | |
| - | * p est le joueur | + | |
| - | * XXXXXXX_STEP_X (bot giver, bot current, bot target, bot previous, player p) | + | |
| - | * giver est le donneur de la mission | + | |
| - | * current est le bot à qui le joueur parle | + | |
| - | * target est le bot à aller voir pour la prochaine etape | + | |
| - | * previous est le bot vu à l' | + | |
| - | * p est le joueur | + | |
| - | * XXXXX_END (bot current, bot giver, bot previous, player p) | + | |
| - | * giver est le donneur de la mission | + | |
| - | * current est le bot à qui le joueur parle | + | |
| - | * previous est le bot vu à l' | + | |
| - | * p est le joueur | + | |
| - | Les paramètres des textes d'étapes du journal dépendent de la nature | + | The parameters of the log's step texts depend on the nature |
| - | Pour les textes de progression de mission | + | For mission |
| - | | + | * MISSION_STEP_GIVE_ITEM_CONTEXT(bot giver, bot previous, item i) |
| - | * MISSION_STEP_TALK_CONTEXT (bot giver, bot previous) | + | |
| - | Le premier est le texte standard, | + | The first is the standard |
| - | == Contexte supplémentaire pour les entrées de menu == | + | == Additional context for menu entries |
| - | Il est possible | + | It is possible |
| - | Deux paramètres | + | Two parameters: the context |
| - | Le nom de la phrase commence par '' | + | The sentence name starts with '' |
| - | === Messages | + | === System |
| - | Les paramètres dépendent des phrases, mais il y a quelques | + | The parameters depend on the sentences, but there are a few well defined |
| * COMBAT_ | * COMBAT_ | ||
| * MAGIC_ | * MAGIC_ | ||





