Wikipedia:工具/Navigation popups/Translation

出自維基百科,自由嘅百科全書

Instructions for translation of string file[編輯]

  • Translate the strings on the righthand side of each assignment. An assignment looks like this:
'string1': 'string2',
You should leave 'string1' unchanged and translate 'string2'. Any apostrophes in 'string2' should be backslash-escaped, for example 'L\'article'. Be sure to leave the comma at the end of the line unchanged.
  • Strings with one or more %s get arguments from the script, e.g. article name or user name. These %s-es are included in string2 in the same order as in string1. If you want a different order, you can instead refer to the arguments as $1, $2, $3, etc.
  • From your skin .js file, e.g. monobook.js, load your translation .js file as well as popups.js or popupsdev.js (see here for description of the two), using code similar to this:
document.write('<script type="text/javascript" src="' 
    + 'http://no.wikipedia.org/w/index.php?title=User:Eddideigel/strings-no.js' 
    + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

document.write('<script type="text/javascript" src="' 
    + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js' 
    + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
  • Kindly include your translation in the list below. To keep the translation updated, you must watch the file that you copied, and change your file according to changes in the original, e.g. new strings or changes in syntax.
  • If there's a string that is not included in the file, please drop a note at en:User talk:Lupin. These strings can be changed if they're difficult to translate to more flexible versions.