/*lang-no.jsNorwegiantranslationforSNAP!writtenbyOlavAMarschallCopyright(C)2013byJensM<EFBFBD>nigThisfileispartofSnap!.Snap!isfreesoftware:youcanredistributeitand/ormodifyitunderthetermsoftheGNUAfferoGeneralPublicLicenseaspublishedbytheFreeSoftwareFoundation,eitherversion3oftheLicense,or(atyouroption)anylaterversion.Thisprogramisdistributedinthehopethatitwillbeuseful,butWITHOUTANYWARRANTY;withouteventheimpliedwarrantyofMERCHANTABILITYorFITNESSFORAPARTICULARPURPOSE.SeetheGNUAfferoGeneralPublicLicenseformoredetails.YoushouldhavereceivedacopyoftheGNUAfferoGeneralPublicLicensealongwiththisprogram.Ifnot,see<http://www.gnu.org/licenses/>.
NotetoTranslators:--------------------Atthisstageofdevelopment,Snap!canbetranslatedtoanyLTRlanguagemaintainingthecurrentorderofinputs(formalparametersinblocks).TranslatingSnap!iseasy:1.DownloadDownloadthesourcesandextractthemintoalocalfolderonyourcomputer:<http://snap.berkeley.edu/snapsource/snap.zip>
UsetheGermantranslationfile(named'lang-de.js')astemplateforyourowntranslations.Startwitheditingtheoriginalfile,becausethatwayyouwillbeabletoimmediatelychecktheresultsinyourbrowserswhileyou're working on your translation (keep the local copy of snap.html open
in your web browser, and refresh it as you progress with your
translation).
2. Edit
Edit the translation file with a regular text editor, or with your
favorite JavaScript editor.
In the first non-commented line (the one right below this
note) replace "de" with the two-letter ISO 639-1 code for your language,
e.g.
fr - French => SnapTranslator.dict.fr = {
it - Italian => SnapTranslator.dict.it = {
pl - Polish => SnapTranslator.dict.pl = {
pt - Portuguese => SnapTranslator.dict.pt = {
es - Spanish => SnapTranslator.dict.es = {
el - Greek => => SnapTranslator.dict.el = {
etc. (see <http://en.wikipedia.org/wiki/ISO_639-1>)
3. Translate
Then work through the dictionary, replacing the German strings against
your translations. The dictionary is a straight-forward JavaScript ad-hoc
object, for review purposes it should be formatted as follows:
{
'Englishstring':
'Translationstring',
'lastkey':
} 'lastvalue'
and you only edit the indented value strings. Note that each key-value
pair needs to be delimited by a comma, but that there shouldn'tbeacommaafterthelastpair(again,justoverwritethetemplatefileandyou'll be
fine).
If something doesn'twork,orifyou're unsure about the formalities you
should check your file with
<http://JSLint.com>
This will inform you about any missed commas etc.
4. Accented characters
Depending on which text editor and which file encoding you use you can
directly enter special characters (e.g. Umlaut, accented characters) on
your keyboard. However, I'venoticedthatsomebrowsersmaynotdisplayspecialcharacterscorrectly,evenifotherbrowsersdo.Soit's best to
check your results in several browsers. If you want to be on the safe
side, it'sevenbettertoescapethesecharactersusingUnicode.see:<http://0xcc.net/jsescape/>
5.Blockspecs:Atthistimeyourtranslationofblockspecswillonlyworkcorrectly,iftheorderofformalparametersandtheirtypesareunchanged.Placeholdersforinputs(formalparameters)areindicatedbyapreceding%prefixandfollowedbyatypeabbreviation.Forexample:'say %s for %n secs'cancurrentlynotbechangedinto'say %n secs long %s'andstillworkasintended.Similarly'point towards %dst'cannotbecha