Málle:Tr

Wikipedia'as/is

tr is template to mark text for translation. The source for the translation is either a list of word pairs which point to even several alternate forms, or a redirect. The system will only have a very limited capability to change change the entries from one form to another, but over time the growing number of redirects on alternate forms will make an evergrowing number of translate pairs.

The redirects has a similar role as the iw-links to other language projects, but is internal to the project.

A JS-function will translate the name from one form to another, by doing the actual lookup. When a user confirms the translation a redirect is created, which is marked as a translation pair for the two languages. Redirects are the preferred source for translations, but lists of known translations act like defaults. More comprehensive translation tools may be added at a later stage. When the user confirms the translation the article will also be opened for edit and the translation markup will be removed and replaced with the translation itself.

Text marked for translation will be given a yellow background, when the the translation was successfull the background will turn green if not the background turns red.

Possibly there will be two templates, one for translating strings that will not attempt to create redirects and one for translating links that will create them. It seems like there will be a link part and a title part, where the title part may be one of several redirects and the link is the destination. A match against a redirect may always produce a link. A list of word pairs may use links, and a match will then be a link. This may produce an erroneous link, but that can be corrected and later translations will detect the change.

  • anonymous 1 : The string to translate
  • lang : Language of the source string, if missing the user language will be used
  • set : Prepared lists of pairs, typically the columns must be identified by a language attribute in the header
  • context : A context where this translation is correct, typically it will include use of a parenthesis form
  • pragma : Processor directive going to the external engine, no directive will imply no external request

Note that the parenthesis form for the context will create a problem because it will typically be given in the language of the source while it is expressed in the project with another language, so the set and context must also be redirected.

See also Sámi Giellatekno