User Tools

Site Tools


translator_guide

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
translator_guide [2013/09/11 15:37]
lukakama
translator_guide [2014/10/17 11:06] (current)
lukakama [Action activation phrases]
Line 1: Line 1:
-**This guide is intended for users that want to contribute on Voice Control ​translations.**+**This guide is intended for users that want to contribute on KLets translations.**
  
-Currently, ​Voice Control ​translations can be edited and contributed using the [[http://​translate.voicecontrolapp.com/​|Translation Site]]. The site has registration disabled (to avoid spammer), but unregistered users can suggest new or better translations that then could be approved and applied by any registered user.+Currently, ​KLets translations can be edited and contributed using the [[http://​translate.voicecontrolapp.com/​|Translation Site]]. The site has registration disabled (to avoid spammer), but unregistered users can suggest new or better translations that then could be approved and applied by any registered user.
  
 If you want to request an account, just compile the [[http://​www.voicecontrolapp.com/​beta-and-translation-access-request/​|access request form]]. If you want to request an account, just compile the [[http://​www.voicecontrolapp.com/​beta-and-translation-access-request/​|access request form]].
 This way, you will be credited for your translations,​ and you will be able to configure notification preferences to be notified on other translation comments, suggestions,​ and so on. This way, you will be credited for your translations,​ and you will be able to configure notification preferences to be notified on other translation comments, suggestions,​ and so on.
  
-The current translation site is based on [[http://​weblate.org|Weblate]] project, and Voice Control ​texts are organized and separated into multiple sub-projects,​ in order to separate **mandatory** texts, that must be edited carefully and must be fully translated with each Play Store release, from **low** priority translation,​ that can be missing from a Play Store release.+The current translation site is based on [[http://​weblate.org|Weblate]] project, and KLets texts are organized and separated into multiple sub-projects,​ in order to separate **mandatory** texts, that must be edited carefully and must be fully translated with each Play Store release, from **low** priority translation,​ that can be missing from a Play Store release.
  
 ====== Translation Site usage ====== ====== Translation Site usage ======
Line 31: Line 31:
  
 ===== Weblate documentation ===== ===== Weblate documentation =====
-If you want, you can also read further information on how to use [[http://​weblate.org|Weblate]] reading his [[http://​weblate.readthedocs.org/​en/​latest/​usage.html|Documentation site]]. However, it is quite simple to use, so you can skip it.+If you want, you can also read further information on how to use [[http://​weblate.org|Weblate]] reading his [[http://​weblate.readthedocs.org/​en/​latest/​user/index.html|Documentation site]]. However, it is quite simple to use, so you can skip it.
  
 ====== Translation texts overview ====== ====== Translation texts overview ======
Line 38: Line 38:
 Each resource is also associated with an identification key called ''​context'',​ that is used for organization and identification purposes, and can have some special meaning as you will notice below. Each resource is also associated with an identification key called ''​context'',​ that is used for organization and identification purposes, and can have some special meaning as you will notice below.
 ===== Resource types ===== ===== Resource types =====
-Voice Control ​actually is using various type of resources: "​[[#​Single value resources|single value]]",​ "​[[#​Plural values resources|plural values]]"​ "​[[#​Fixed multiple value resources|fixed multiple value]]"​ and "​[[#​Dynamic multiple value resources|dynamic multiple value]]"​.+KLets actually is using various type of resources: "​[[#​Single value resources|single value]]",​ "​[[#​Plural values resources|plural values]]"​ "​[[#​Fixed multiple value resources|fixed multiple value]]"​ and "​[[#​Dynamic multiple value resources|dynamic multiple value]]"​.
  
 ==== Single value resources ==== ==== Single value resources ====
Line 50: Line 50:
 These rules define six categories of quantities named ''​zero'',​ ''​one'',​ ''​two'',​ ''​few'',​ ''​many''​ and ''​other'',​ where for each language are used only needed categories, and for which there are language specific rules for when they are used. For example, category ''​one''​ is commonly used when the quantity is 1, but for Russian it is used also for 21, 31 etc, but not for 11. These rules define six categories of quantities named ''​zero'',​ ''​one'',​ ''​two'',​ ''​few'',​ ''​many''​ and ''​other'',​ where for each language are used only needed categories, and for which there are language specific rules for when they are used. For example, category ''​one''​ is commonly used when the quantity is 1, but for Russian it is used also for 21, 31 etc, but not for 11.
  
-Below there is an extract of plural rules for languages used by Voice Control:+Below there is an extract of plural rules for languages used by KLets:
 ^ Language ​     ^ Category ​      ^ Examples ​ ^ Rules ^ ^ Language ​     ^ Category ​      ^ Examples ​ ^ Rules ^
 | Chinese | other | 0-999;\\ 1.2...| other ? everything | | Chinese | other | 0-999;\\ 1.2...| other ? everything |
Line 67: Line 67:
 | ::: | few |2-4, 22-24, 32-34... | few ? n mod 10 in 2..4 and n mod 100 not in 12..14; | | ::: | few |2-4, 22-24, 32-34... | few ? n mod 10 in 2..4 and n mod 100 not in 12..14; |
 | ::: | many | 0, 5-20, 25-30, 35-40... | many ? n mod 10 is 0 or n mod 10 in 5..9 or n mod 100 in 11..14; | | ::: | many | 0, 5-20, 25-30, 35-40... | many ? n mod 10 is 0 or n mod 10 in 5..9 or n mod 100 in 11..14; |
-| ::: | other | 1.2, 2.07, 5.94... | other ? everything else //(actually Android doesn'​t support fractional values, so this category will not be used by Voice Control)// |+| ::: | other | 1.2, 2.07, 5.94... | other ? everything else //(actually Android doesn'​t support fractional values, so this category will not be used by KLets)// |
 ^ Language ​     ^ Category ​      ^ Examples ​ ^ Rules ^ ^ Language ​     ^ Category ​      ^ Examples ​ ^ Rules ^
 | Spanish | one |1 | one ? n is 1; | | Spanish | one |1 | one ? n is 1; |
Line 79: Line 79:
  
 ==== Dynamic multiple value resources ==== ==== Dynamic multiple value resources ====
-Dynamic multiple value resources can have an arbitrary amount of values for each language (from 0 to infinite) regardless the English version or other languages. Due Translation Site limitations,​ this type of resource are handled as a single value resource, where each value is separated by a "new line". Additionally, ​Voice Control ​will strip off any empty line end every heading or trailing spaces for each value.+Dynamic multiple value resources can have an arbitrary amount of values for each language (from 0 to infinite) regardless the English version or other languages. Due Translation Site limitations,​ this type of resource are handled as a single value resource, where each value is separated by a "new line". Additionally, ​KLets will strip off any empty line end every heading or trailing spaces for each value.
  
 To know if a resource is a dynamic multiple value type or not, you need to check its context name (some resources are know to be dynamic multiple values, like command templates as shown below), or if it is highlighted inside the resource comments. To know if a resource is a dynamic multiple value type or not, you need to check its context name (some resources are know to be dynamic multiple values, like command templates as shown below), or if it is highlighted inside the resource comments.
Line 98: Line 98:
  
 ====== Resources organization ====== ====== Resources organization ======
-Voice Control ​resources are separated in 3 main sub-projects as follow.+KLets resources are separated in 3 main sub-projects as follow.
  
 ===== Commands resource sub-project ===== ===== Commands resource sub-project =====
Line 111: Line 111:
  
 Each phrase can contains variable parts that are marked using a special word in uppercase inside square brackets called "​token",​ like this ''​[THIS_IS_A_TOKEN]''​.\\ Each phrase can contains variable parts that are marked using a special word in uppercase inside square brackets called "​token",​ like this ''​[THIS_IS_A_TOKEN]''​.\\
-Tokens can be added or removed from phrases, but their contents must remain the same across all languages. Tokens, also, **MUST** be placed only one time inside a phrase and **MUST** be separated from other token **AT LEAST** by a single character word, otherwise ​Voice Control ​will ignore the phrase and will not use it to activate an action.+Tokens can be added or removed from phrases, but their contents must remain the same across all languages. Tokens, also, **MUST** be placed only one time inside a phrase and **MUST** be separated from other token **AT LEAST** by a single character word, otherwise ​KLets will ignore the phrase and will not use it to activate an action.
  
-Action phrases, also, don't have to respect a specific case for text, because ​Voice Control ​will convert them in lowercase when loading them (except for the variable tokens, that must be written in uppercase).+Action phrases, also, don't have to respect a specific case for text, because ​KLets will convert them in lowercase when loading them (except for the variable tokens, that must be written in uppercase).
  
 Taking as an example the predefined English phrases for the "Add event" action (as in version 2.2.5), we have: Taking as an example the predefined English phrases for the "Add event" action (as in version 2.2.5), we have:
 <​code>​ <​code>​
 add event add event
- add an event+add an event
  
- add event [EVENT_NAME] +add event [EVENT_NAME] 
- Add an event [EVENT_NAME] +Add an event [EVENT_NAME] 
- add the Event [EVENT_NAME+add the Event [EVENT_NAME]
- +
- add event [EVENT_NAME] on [DATE] +
- add an event [EVENT_NAME] on [DATE] +
- add the event [EVENT_NAME] on [DATE]+
  
 +add event [EVENT_NAME] on [DATE]
 +add an event [EVENT_NAME] on [DATE]
 +add the event [EVENT_NAME] on [DATE]
 </​code>​ </​code>​
  
-Voice Control ​will load them as follow:+KLets will load them as follow:
 ^ Phrase ​     ^ Tokens ​      ^ ^ Phrase ​     ^ Tokens ​      ^
-|add event     | No tokens, ​Voice Control ​will ask for missing and required variables when the action is activated using this phrase (EVENT_NAME and DATE for the "Add event" action) | +|add event     | No tokens, ​KLets will ask for missing and required variables when the action is activated using this phrase (EVENT_NAME and DATE for the "Add event" action) | 
-|add an event | Voice Control ​will ask for missing and required variables | +|add an event | KLets will ask for missing and required variables | 
-|add event [EVENT_NAME] | EVENT_NAME variable available, ​Voice Control ​will ask the user only for the DATE variable | +|add event [EVENT_NAME] | EVENT_NAME variable available, ​KLets will ask the user only for the DATE variable | 
-|add an event [EVENT_NAME] | Voice Control ​will ask the user for the DATE variable| +|add an event [EVENT_NAME] | KLets will ask the user for the DATE variable| 
-|add the event [EVENT_NAME] | Voice Control ​will ask the user for the DATE variable| +|add the event [EVENT_NAME] | KLets will ask the user for the DATE variable| 
-|add event [EVENT_NAME] on [DATE] | All variable available, ​Voice Control ​will add an event with EVENT_NAME and DATE specified by the user | +|add event [EVENT_NAME] on [DATE] | All variable available, ​KLets will add an event with EVENT_NAME and DATE specified by the user | 
-|add an event [EVENT_NAME] on [DATE] | All variable available, ​Voice Control ​will add an event with EVENT_NAME and DATE specified by the user | +|add an event [EVENT_NAME] on [DATE] | All variable available, ​KLets will add an event with EVENT_NAME and DATE specified by the user | 
-|add the event [EVENT_NAME] on [DATE] | All variable available, ​Voice Control ​will add an event with EVENT_NAME and DATE specified by the user |+|add the event [EVENT_NAME] on [DATE] | All variable available, ​KLets will add an event with EVENT_NAME and DATE specified by the user |
 ===== Main resource sub-project ===== ===== Main resource sub-project =====
 This sub-project contains resources used for actions help and guide (displayed on opening screen), hint (displayed on recognition screen), template customization (displayed inside the action customization function) and voice outputs (text spoken with the Android TextToSpeech engine). This sub-project contains resources used for actions help and guide (displayed on opening screen), hint (displayed on recognition screen), template customization (displayed inside the action customization function) and voice outputs (text spoken with the Android TextToSpeech engine).
Line 151: Line 150:
   * **action_**//​action_key//​**_name**:​ it is the user readable name of the action, and it is used inside the main screen (as action name heading above helps texts) and inside the action phrases customization function.   * **action_**//​action_key//​**_name**:​ it is the user readable name of the action, and it is used inside the main screen (as action name heading above helps texts) and inside the action phrases customization function.
   * **action_**//​action_key//​**_help**:​ used to identify resources displayed as action help inside the main screen. Usually, this resources contains a brief explanation of the action and a couple of practical usage examples with predefined action phrases as defined in the [[#Commands resource sub-project]].   * **action_**//​action_key//​**_help**:​ used to identify resources displayed as action help inside the main screen. Usually, this resources contains a brief explanation of the action and a couple of practical usage examples with predefined action phrases as defined in the [[#Commands resource sub-project]].
-  * **action_**//​action_key//​**_hint**:​ used to identify resources displayed as quick hint while using the voice recognition,​ in order to quickly tell the user what actions he can say and how. if this resource is missing for an action, than Voice Control ​will auto-calculate it from default action phrases.+  * **action_**//​action_key//​**_hint**:​ used to identify resources displayed as quick hint while using the voice recognition,​ in order to quickly tell the user what actions he can say and how. if this resource is missing for an action, than KLets will auto-calculate it from default action phrases.
   * **action_**//​action_key//​**_param_**//​param_key//:​ used to ask the user to tell the parameter.   * **action_**//​action_key//​**_param_**//​param_key//:​ used to ask the user to tell the parameter.
   * **action_**//​action_key//​**_param_**//​param_key//​**_help**:​ quick help that explains what the parameter is expected to be. It is used for automatic hint text generation (for such actions without an hint resource), and inside the action phrases customization function when the variable selection dialog is shown to the user (when adding a variable to a phrase).   * **action_**//​action_key//​**_param_**//​param_key//​**_help**:​ quick help that explains what the parameter is expected to be. It is used for automatic hint text generation (for such actions without an hint resource), and inside the action phrases customization function when the variable selection dialog is shown to the user (when adding a variable to a phrase).
   * **action_**//​action_key//​**_param_**//​param_key//​**_sample**:​ quick practical sample of what can be said as value for the parameter   * **action_**//​action_key//​**_param_**//​param_key//​**_sample**:​ quick practical sample of what can be said as value for the parameter
  
-Other resource starting with **action_**//​action_key//​ are additional texts used by the action (for example, to tell to the user that the command has been completed or that there are problems inside ​Voice Control ​settings, like missing accounts etc).+Other resource starting with **action_**//​action_key//​ are additional texts used by the action (for example, to tell to the user that the command has been completed or that there are problems inside ​KLets settings, like missing accounts etc).
 ===== Miscellaneous resource sub-project ===== ===== Miscellaneous resource sub-project =====
 This sub-project contains resources used for options, error messages, alerts and other miscelaneous things. This sub-project contains resources used for options, error messages, alerts and other miscelaneous things.
  
 Resources inside this sub-project are **low priority** resources: they could be missing for some languages, where english text are acceptable to be shown. Resources inside this sub-project are **low priority** resources: they could be missing for some languages, where english text are acceptable to be shown.
translator_guide.1378906668.txt.gz · Last modified: 2013/09/11 15:37 by lukakama