r77932 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77931‎ | r77932 | r77933 >
Date:23:32, 6 December 2010
Author:reedy
Status:deferred (Comments)
Tags:
Comment:
Wikibasha: bug 26265 - Missing ; from JS
Modified paths:
  • /trunk/extensions/WikiBhasha/src/js/core/chineaseLangSelection.js (modified) (history)
  • /trunk/extensions/WikiBhasha/src/js/core/configurations.templateMappers.js (modified) (history)
  • /trunk/extensions/WikiBhasha/src/js/core/styleBackgroundImages.js (modified) (history)
  • /trunk/extensions/WikiBhasha/src/js/core/templateAndLinkTranslator.js (modified) (history)
  • /trunk/extensions/WikiBhasha/src/js/extern/wikipediaInterface.js (modified) (history)
  • /trunk/extensions/WikiBhasha/src/js/jsLib/jquery.shortcut.js (modified) (history)
  • /trunk/extensions/WikiBhasha/src/js/main.js (modified) (history)
  • /trunk/extensions/WikiBhasha/src/lang/de/strings.js (modified) (history)
  • /trunk/extensions/WikiBhasha/src/lang/en/strings.js (modified) (history)
  • /trunk/extensions/WikiBhasha/src/lang/fr/strings.js (modified) (history)

Diff [purge]

Index: trunk/extensions/WikiBhasha/src/lang/en/strings.js
@@ -23,95 +23,95 @@
2424
2525 wikiBhasha.localStrings = {
2626
27 - failureMsg: "Unable to launch WikiBhasha\n",
28 - collaborativeTitle: "Welcome to WikiBhasha beta, a collaborative tool for enhancing multilingual content in Wikipedias.",
29 - collaborativeSearchTitle: "Please input terms to search for within English and the target language Wikipedias.",
30 - currentLanguage1: "You are currently on the",
31 - currentLanguage2: "article in the English Wikipedia.",
32 - exit: "Exit WikiBhasha",
33 - languageArticle: "Select the target language.",
34 - detectArticle: "This article does not exist in the target language Wikpedia. Please provide a title to create one.",
35 - existingtArticle: "This article already exists in the target language.",
36 - notApplicableStep: "This step in not applicable for current article.",
37 - important: "Important!",
38 - importantNote: "Please click on the \"WikiBhasha (Beta)\" bookmarklet again when you are in the target language Wikipedia!",
39 - contributeBtn: "Contribute to its version in another language",
40 - articleTitle: "Article Title",
41 - searchTabTitle: "Search for source article",
42 - contributeTo: "Enhance existing article in target language",
43 - create: "Create new article in the target language",
44 - space: " ",
45 - dot: ".",
46 - themeBlue: "Theme Blue",
47 - themeBlack: "Theme Black",
48 - themeSilver: "Theme Silver",
49 - help: "Help",
50 - maximize: "Maximize",
51 - close: "Close",
52 - sourceArticle: "Source Article",
53 - search: "Search",
54 - historyLabel: "Visited Topics",
55 - translate: "Translate to",
56 - scratchPad: "Scratch Pad",
57 - searchHeader: "Search",
58 - convertEntireArticle: "Get the entire article from Source",
59 - emptySearchResult: "There were no results matching the query.",
60 - english: "English",
61 - toText: "to",
62 - bringContentFromPane: "Bring the translated & corrected source content",
63 - articleAlreadyExists: "An article with title '{0}' already exists in target language Wikipedia, do you want to edit this page?",
64 - emptySearchResult: "There were no results matching the query.",
65 - emptySource: "No Inter-wiki-linked English article exists, for the topic you are working on currently. You may want to search for appropriate material using the ‘Search’ feature.",
66 - emptyInputText: "Please enter a valid text and continue.",
67 - unSupportedLanguage: "This target language is not currently supported in WikiBhasha.",
68 - invalidBookmarklet: "Please select appropriate book marklet",
69 - defaultLanguageText: "Select Language",
70 - warningMsg: "Please save your work",
71 - clearAll: "Clear All",
72 - sourceTextHeader: "Source Text",
73 - translatedTextHeader: "Translated Text",
74 - loadingElementContent: "Loading article...",
75 - sourceArticleNotApplicable: "Source language content is not applicable here.",
76 - scratchPadTextLimitConfirmMsg: "The entered text exceeds given limit of {0} characters.\n\nIf you continue to translate, it will discard the text that is beyond the limit",
77 - scratchPadTextLimitNote: "Maximum characters allowed per translation are {0} characters",
78 - feedbackTextLimitNote: "[Maximum of {0} characters]",
79 - feedbackThankYouMessage: "Thank you for the feedback.",
80 - feedbackErrorMessage: "Could not submit your feedback.<br/><br/>Click <a href='javascript:;' id='feedbackEmailLink'>here</a> to submit via e-mail.",
81 - feedbackEmptyTextAlertMessage: "Please select one option or enter some text in the provided text area.",
82 - warningSaveComposeChanges: "Any changes made in this step would be lost if you move to an earlier step. Do you want to move anyway?",
83 - noTargetLanguageArticleFound: "Linked article not found in target language Wikipedia.",
84 - feedbackQuestionMessage: "Before leaving WikiBhasha, would you like to give us feedback?",
85 - previewErrorMessage: "Unable to show the preview.",
86 - loadingPreviewContent: "Loading Preview...",
 27+ failureMsg: "Unable to launch WikiBhasha\n",
 28+ collaborativeTitle: "Welcome to WikiBhasha beta, a collaborative tool for enhancing multilingual content in Wikipedias.",
 29+ collaborativeSearchTitle: "Please input terms to search for within English and the target language Wikipedias.",
 30+ currentLanguage1: "You are currently on the",
 31+ currentLanguage2: "article in the English Wikipedia.",
 32+ exit: "Exit WikiBhasha",
 33+ languageArticle: "Select the target language.",
 34+ detectArticle: "This article does not exist in the target language Wikpedia. Please provide a title to create one.",
 35+ existingtArticle: "This article already exists in the target language.",
 36+ notApplicableStep: "This step in not applicable for current article.",
 37+ important: "Important!",
 38+ importantNote: "Please click on the \"WikiBhasha (Beta)\" bookmarklet again when you are in the target language Wikipedia!",
 39+ contributeBtn: "Contribute to its version in another language",
 40+ articleTitle: "Article Title",
 41+ searchTabTitle: "Search for source article",
 42+ contributeTo: "Enhance existing article in target language",
 43+ create: "Create new article in the target language",
 44+ space: " ",
 45+ dot: ".",
 46+ themeBlue: "Theme Blue",
 47+ themeBlack: "Theme Black",
 48+ themeSilver: "Theme Silver",
 49+ help: "Help",
 50+ maximize: "Maximize",
 51+ close: "Close",
 52+ sourceArticle: "Source Article",
 53+ search: "Search",
 54+ historyLabel: "Visited Topics",
 55+ translate: "Translate to",
 56+ scratchPad: "Scratch Pad",
 57+ searchHeader: "Search",
 58+ convertEntireArticle: "Get the entire article from Source",
 59+ emptySearchResult: "There were no results matching the query.",
 60+ english: "English",
 61+ toText: "to",
 62+ bringContentFromPane: "Bring the translated & corrected source content",
 63+ articleAlreadyExists: "An article with title '{0}' already exists in target language Wikipedia, do you want to edit this page?",
 64+ emptySearchResult: "There were no results matching the query.",
 65+ emptySource: "No Inter-wiki-linked English article exists, for the topic you are working on currently. You may want to search for appropriate material using the ‘Search’ feature.",
 66+ emptyInputText: "Please enter a valid text and continue.",
 67+ unSupportedLanguage: "This target language is not currently supported in WikiBhasha.",
 68+ invalidBookmarklet: "Please select appropriate book marklet",
 69+ defaultLanguageText: "Select Language",
 70+ warningMsg: "Please save your work",
 71+ clearAll: "Clear All",
 72+ sourceTextHeader: "Source Text",
 73+ translatedTextHeader: "Translated Text",
 74+ loadingElementContent: "Loading article...",
 75+ sourceArticleNotApplicable: "Source language content is not applicable here.",
 76+ scratchPadTextLimitConfirmMsg: "The entered text exceeds given limit of {0} characters.\n\nIf you continue to translate, it will discard the text that is beyond the limit",
 77+ scratchPadTextLimitNote: "Maximum characters allowed per translation are {0} characters",
 78+ feedbackTextLimitNote: "[Maximum of {0} characters]",
 79+ feedbackThankYouMessage: "Thank you for the feedback.",
 80+ feedbackErrorMessage: "Could not submit your feedback.<br/><br/>Click <a href='javascript:;' id='feedbackEmailLink'>here</a> to submit via e-mail.",
 81+ feedbackEmptyTextAlertMessage: "Please select one option or enter some text in the provided text area.",
 82+ warningSaveComposeChanges: "Any changes made in this step would be lost if you move to an earlier step. Do you want to move anyway?",
 83+ noTargetLanguageArticleFound: "Linked article not found in target language Wikipedia.",
 84+ feedbackQuestionMessage: "Before leaving WikiBhasha, would you like to give us feedback?",
 85+ previewErrorMessage: "Unable to show the preview.",
 86+ loadingPreviewContent: "Loading Preview...",
8787
88 - //tooptip strings
89 - searchInputTooltip: "Search",
90 - collapseTooltip: "Collapse",
91 - expandPaneTooltip: "Expand",
 88+ //tooptip strings
 89+ searchInputTooltip: "Search",
 90+ collapseTooltip: "Collapse",
 91+ expandPaneTooltip: "Expand",
9292
93 - //help tutorials array[slideNo,text]
94 - tutorials: ["Welcome to WikiBhasha beta, a collaborative tool that helps Wikipedia user communities enhance" +
95 - " content in their respective language Wikipedias. WikiBhasha started as a research project in" +
96 - " Microsoft Research. It is now being made available as an open source project on MediaWiki." +
97 - " The tools is also available as a user gadget in Wikipedia as well as a bookmarklet from" +
98 - " <a href=\"http://www.wikibhasha.org/\" class=\"external\">www.WikiBhasha.org</a>. Please comply with Wikipedia’s norms"+
99 - " for content contribution." +
100 - "<br><br>" +
101 - "Current WikiBhasha beta version: 1.0.0<br><br>" +
102 - "<a href=\"mailto:wikibfb@microsoft.com?subject=WikiBhasha beta Feedback\">Feedback to WikiBhasha team</a> welcome.",
103 - "<b>Supported Platforms: </b><P><P>\tIE 7/8 on Windows XP/Vista/Win7 and " +
104 - "Firefox 3.5 or above on Linux Fedora 11/12. " +
105 - "<b><P><P> Supported Languages: </b><P><P>\t" +
106 - "Currently WikiBhasha (Beta) supports all language pairs supported by"+
107 - " <a href=\"http://www.microsofttranslator.com/\" class=\"external\">Microsoft Translator</a> (where"+
108 - " the source language is English)<P><P>"
109 - ],
110 - nonWikiDomainMsg: "Please select a valid article from wikipedia and invoke WikiBhasha.",
111 - noSourceArticleFound: "In English Wikipedia, WikiBhasha may be invoked only on an existing article.",
112 - waitUntilTranslationComplete: "Please wait till the translation completes.",
113 - thanksMessage: "Thank you for your contribution to Wikipedia. Would you like to give feedback?",
114 - nonEditableMessage: "WikiBhasha may be invoked only on editable articles; this article is protected in Wikipedia."
115 - }
 93+ //help tutorials array[slideNo,text]
 94+ tutorials: ["Welcome to WikiBhasha beta, a collaborative tool that helps Wikipedia user communities enhance" +
 95+ " content in their respective language Wikipedias. WikiBhasha started as a research project in" +
 96+ " Microsoft Research. It is now being made available as an open source project on MediaWiki." +
 97+ " The tools is also available as a user gadget in Wikipedia as well as a bookmarklet from" +
 98+ " <a href=\"http://www.wikibhasha.org/\" class=\"external\">www.WikiBhasha.org</a>. Please comply with Wikipedia’s norms" +
 99+ " for content contribution." +
 100+ "<br><br>" +
 101+ "Current WikiBhasha beta version: 1.0.0<br><br>" +
 102+ "<a href=\"mailto:wikibfb@microsoft.com?subject=WikiBhasha beta Feedback\">Feedback to WikiBhasha team</a> welcome.",
 103+ "<b>Supported Platforms: </b><P><P>\tIE 7/8 on Windows XP/Vista/Win7 and " +
 104+ "Firefox 3.5 or above on Linux Fedora 11/12. " +
 105+ "<b><P><P> Supported Languages: </b><P><P>\t" +
 106+ "Currently WikiBhasha (Beta) supports all language pairs supported by" +
 107+ " <a href=\"http://www.microsofttranslator.com/\" class=\"external\">Microsoft Translator</a> (where" +
 108+ " the source language is English)<P><P>"
 109+ ],
 110+ nonWikiDomainMsg: "Please select a valid article from wikipedia and invoke WikiBhasha.",
 111+ noSourceArticleFound: "In English Wikipedia, WikiBhasha may be invoked only on an existing article.",
 112+ waitUntilTranslationComplete: "Please wait till the translation completes.",
 113+ thanksMessage: "Thank you for your contribution to Wikipedia. Would you like to give feedback?",
 114+ nonEditableMessage: "WikiBhasha may be invoked only on editable articles; this article is protected in Wikipedia."
 115+ };
116116
117117 //short cut to call local strings
118118 wbLocal = wikiBhasha.localStrings;
Index: trunk/extensions/WikiBhasha/src/lang/fr/strings.js
@@ -23,93 +23,93 @@
2424
2525 wikiBhasha.localStrings = {
2626
27 - failureMsg: "Impossible de démarrer WikiBhasha\n",
28 - collaborativeTitle: "Bienvenue à la beta de WikiBhasha, un outil collaboratif pour améliorer le contenu multilingue de Wikipedia.",
29 - collaborativeSearchTitle: "Entrez des termes à rechercher sur le Wikipedia anglophone et celui de la langue cible.",
30 - currentLanguage1: "Vous êtes actuellement sur l'article ",
31 - currentLanguage2: "du Wikipedia anglophone.",
32 - exit: "Quitter WikiBhasha",
33 - languageArticle: "Choisissez la langue cible.",
34 - detectArticle: "L'article n'existe pas dans la langue ciblé. Indiquez un titre pour le créer.",
35 - existingtArticle: "L'article existe déjà dans la langue cible.",
36 - notApplicableStep: "Cette étape n'est pas applicable à l'article en cours.",
37 - important: "Important !",
38 - importantNote: "Cliquez à nouveau sur le marque-page \"WikiBhasha (Beta)\" lorsque vous serez sur le Wikipedia de la langue cible.",
39 - contributeBtn: "Contribuer à son équivalent dans une autre langue",
40 - articleTitle: "Titre d'Article",
41 - searchTabTitle: "Chercher l'article source",
42 - contributeTo: "Améliorer l'article existant dans la langue cible",
43 - create: "Créer l'article dans la langue cible",
44 - space: " ",
45 - dot: ".",
46 - themeBlue: "Thème Bleu",
47 - themeBlack: "Thème Noir",
48 - themeSilver: "Thème Argent",
49 - help: "Aide",
50 - maximize: "Agrandir",
51 - close: "Fermer",
52 - sourceArticle: "Article Source",
53 - search: "Chercher",
54 - historyLabel: "Sujets visités",
55 - translate: "Traduire en",
56 - scratchPad: "Scratch Pad",
57 - searchHeader: "Recherche",
58 - convertEntireArticle: "Récupérer l'article de la Source",
59 - emptySearchResult: "Aucun résultat pour la requête.",
60 - english: "Anglais",
61 - toText: "en",
62 - bringContentFromPane: "Apporter le contenu traduit et corrigé",
63 - articleAlreadyExists: "Un article avec le titre '{0}' existe déjà dans le Wikipedia cible, souhaitez-vous éditer cette page ?",
64 - emptySearchResult: "Aucun résultat pour la recherche.",
65 - emptySource: "L'interwiki pour l'anglais n'existe pas. Recherchez un article approprié.",
66 - emptyInputText: "Entrez un texte valide et continuez.",
67 - unSupportedLanguage: "La langue cible n'est pas supportée par WikiBasha pour le moment.",
68 - invalidBookmarklet: "Choisissez un autre marque-page",
69 - defaultLanguageText: "Choix de langue",
70 - warningMsg: "Merci d'enregistrer votre travail",
71 - clearAll: "Tout Vider",
72 - sourceTextHeader: "Texte Source",
73 - translatedTextHeader: "Texte Traduit",
74 - loadingElementContent: "Chargement de l'article ...",
75 - sourceArticleNotApplicable: "Le contenu de la langue source n'est pas applicable ici..",
76 - scratchPadTextLimitConfirmMsg: "Le texte entré dépasse la limite de {0} caractères.\n\nSi vous poursuivez votre traduction, vous détruirez le texte qui dépasse cette limite",
77 - scratchPadTextLimitNote: "Chaque traduction est limitée à {0} caractères maximum.",
78 - feedbackTextLimitNote: "[Maximum de {0} caractères]",
79 - feedbackThankYouMessage: "Merci pour votre avis!",
80 - feedbackErrorMessage: "Impossible d'envoyer votre avis.<br/><br/>Cliquez <a href='javascript:;' id='feedbackEmailLink'>ici</a> pour l'envoyer par courriel.",
81 - feedbackEmptyTextAlertMessage: "Choisissez une option ou entrez du texte.",
82 - warningSaveComposeChanges: "Tout changement réalisé lors de cette étape sera perdu si vous revenez à une étape précédente. Voulez-vous tout de même revenir en arrière ?",
83 - noTargetLanguageArticleFound: "Article lié introuvable dans le Wikipedia de la langue cible.",
84 - feedbackQuestionMessage: "Avant de quitter WikiBhasha, voulez-vous nous donner votre avis ?",
 27+ failureMsg: "Impossible de démarrer WikiBhasha\n",
 28+ collaborativeTitle: "Bienvenue à la beta de WikiBhasha, un outil collaboratif pour améliorer le contenu multilingue de Wikipedia.",
 29+ collaborativeSearchTitle: "Entrez des termes à rechercher sur le Wikipedia anglophone et celui de la langue cible.",
 30+ currentLanguage1: "Vous êtes actuellement sur l'article ",
 31+ currentLanguage2: "du Wikipedia anglophone.",
 32+ exit: "Quitter WikiBhasha",
 33+ languageArticle: "Choisissez la langue cible.",
 34+ detectArticle: "L'article n'existe pas dans la langue ciblé. Indiquez un titre pour le créer.",
 35+ existingtArticle: "L'article existe déjà dans la langue cible.",
 36+ notApplicableStep: "Cette étape n'est pas applicable à l'article en cours.",
 37+ important: "Important !",
 38+ importantNote: "Cliquez à nouveau sur le marque-page \"WikiBhasha (Beta)\" lorsque vous serez sur le Wikipedia de la langue cible.",
 39+ contributeBtn: "Contribuer à son équivalent dans une autre langue",
 40+ articleTitle: "Titre d'Article",
 41+ searchTabTitle: "Chercher l'article source",
 42+ contributeTo: "Améliorer l'article existant dans la langue cible",
 43+ create: "Créer l'article dans la langue cible",
 44+ space: " ",
 45+ dot: ".",
 46+ themeBlue: "Thème Bleu",
 47+ themeBlack: "Thème Noir",
 48+ themeSilver: "Thème Argent",
 49+ help: "Aide",
 50+ maximize: "Agrandir",
 51+ close: "Fermer",
 52+ sourceArticle: "Article Source",
 53+ search: "Chercher",
 54+ historyLabel: "Sujets visités",
 55+ translate: "Traduire en",
 56+ scratchPad: "Scratch Pad",
 57+ searchHeader: "Recherche",
 58+ convertEntireArticle: "Récupérer l'article de la Source",
 59+ emptySearchResult: "Aucun résultat pour la requête.",
 60+ english: "Anglais",
 61+ toText: "en",
 62+ bringContentFromPane: "Apporter le contenu traduit et corrigé",
 63+ articleAlreadyExists: "Un article avec le titre '{0}' existe déjà dans le Wikipedia cible, souhaitez-vous éditer cette page ?",
 64+ emptySearchResult: "Aucun résultat pour la recherche.",
 65+ emptySource: "L'interwiki pour l'anglais n'existe pas. Recherchez un article approprié.",
 66+ emptyInputText: "Entrez un texte valide et continuez.",
 67+ unSupportedLanguage: "La langue cible n'est pas supportée par WikiBasha pour le moment.",
 68+ invalidBookmarklet: "Choisissez un autre marque-page",
 69+ defaultLanguageText: "Choix de langue",
 70+ warningMsg: "Merci d'enregistrer votre travail",
 71+ clearAll: "Tout Vider",
 72+ sourceTextHeader: "Texte Source",
 73+ translatedTextHeader: "Texte Traduit",
 74+ loadingElementContent: "Chargement de l'article ...",
 75+ sourceArticleNotApplicable: "Le contenu de la langue source n'est pas applicable ici..",
 76+ scratchPadTextLimitConfirmMsg: "Le texte entré dépasse la limite de {0} caractères.\n\nSi vous poursuivez votre traduction, vous détruirez le texte qui dépasse cette limite",
 77+ scratchPadTextLimitNote: "Chaque traduction est limitée à {0} caractères maximum.",
 78+ feedbackTextLimitNote: "[Maximum de {0} caractères]",
 79+ feedbackThankYouMessage: "Merci pour votre avis!",
 80+ feedbackErrorMessage: "Impossible d'envoyer votre avis.<br/><br/>Cliquez <a href='javascript:;' id='feedbackEmailLink'>ici</a> pour l'envoyer par courriel.",
 81+ feedbackEmptyTextAlertMessage: "Choisissez une option ou entrez du texte.",
 82+ warningSaveComposeChanges: "Tout changement réalisé lors de cette étape sera perdu si vous revenez à une étape précédente. Voulez-vous tout de même revenir en arrière ?",
 83+ noTargetLanguageArticleFound: "Article lié introuvable dans le Wikipedia de la langue cible.",
 84+ feedbackQuestionMessage: "Avant de quitter WikiBhasha, voulez-vous nous donner votre avis ?",
8585
86 - //tooptip strings
87 - searchInputTooltip: "Recherche",
88 - collapseTooltip: "Réduire",
89 - expandPaneTooltip: "Agrandir",
 86+ //tooptip strings
 87+ searchInputTooltip: "Recherche",
 88+ collapseTooltip: "Réduire",
 89+ expandPaneTooltip: "Agrandir",
9090
91 - //help tutorials array[slideNo,text]
92 - tutorials: [" Bienvenue dans WikiBhasha beta, un outil collaboratif qui aide les communautés de Wikipedia" +
93 - " à améliorer leur contenu dans leur langues respectives. WikiBhasha était un projet de recherche" +
94 - " de Microsoft Research. Il est maintenant mis à disposition en tant que projet open source" +
95 - " de MediaWiki. L'outil est également disponible en tant que gadget utilisateur sur Wikipedia" +
96 - " et en tant que marque-page sur <a href=\"http://www.wikibhasha.org/\" class=\"external\">www.WikiBhasha.org</a>." +
97 - " Merci de respecter les règles de Wikipedia pour en distribuer le contenu." +
98 - "<br/><br/>" +
99 - "Version en cours de WikiBhasha beta : 1.0.0<br/><br/>" +
100 - //"<a href=\"mailto:wikibfb@microsoft.com?subject=WikiBhasha beta Feedback\">Feedback to WikiBhasha team</a> welcome.",
101 - "<b>Plateformes supportées : </b><P><P>\tIE 7/8 sur Windows XP/Vista/Win7 et " +
102 - "Firefox 3.5 ou suivant sur Linux Fedora 11/12. " +
103 - "<b><P><P> Langues supportées : </b><P><P>\t" +
104 - "Actuellement, WikiBhasha (Beta) supporte toutes les paires de langues gérées par "+
105 - " <a href=\"http://www.microsofttranslator.com/\" class=\"external\">Microsoft Translator</a>" +
106 - " où la langue source est l'anlais<P><P>"
107 - ],
108 - nonWikiDomainMsg: "Choisissez un article valide de Wikipedia et lancez WikiBhasha.",
109 - noSourceArticleFound: "Sur le Wikipedia anglais, WikiBhasha ne peut être utilisé que sur des articles existants.",
110 - waitUntilTranslationComplete: "Patientez jusqu'à ce que la traduction soit complète.",
111 - thanksMessage: "Merci pour votre contribution à Wikipedia. Voulez-vous nous donner votre avis ?",
112 - nonEditableMessage: "WikiBhasha ne peut être utiliser que sur des articles éditable; celui-ci est protégé sur Wikipedia."
113 - }
 91+ //help tutorials array[slideNo,text]
 92+ tutorials: [" Bienvenue dans WikiBhasha beta, un outil collaboratif qui aide les communautés de Wikipedia" +
 93+ " à améliorer leur contenu dans leur langues respectives. WikiBhasha était un projet de recherche" +
 94+ " de Microsoft Research. Il est maintenant mis à disposition en tant que projet open source" +
 95+ " de MediaWiki. L'outil est également disponible en tant que gadget utilisateur sur Wikipedia" +
 96+ " et en tant que marque-page sur <a href=\"http://www.wikibhasha.org/\" class=\"external\">www.WikiBhasha.org</a>." +
 97+ " Merci de respecter les règles de Wikipedia pour en distribuer le contenu." +
 98+ "<br/><br/>" +
 99+ "Version en cours de WikiBhasha beta : 1.0.0<br/><br/>" +
 100+ //"<a href=\"mailto:wikibfb@microsoft.com?subject=WikiBhasha beta Feedback\">Feedback to WikiBhasha team</a> welcome.",
 101+ "<b>Plateformes supportées : </b><P><P>\tIE 7/8 sur Windows XP/Vista/Win7 et " +
 102+ "Firefox 3.5 ou suivant sur Linux Fedora 11/12. " +
 103+ "<b><P><P> Langues supportées : </b><P><P>\t" +
 104+ "Actuellement, WikiBhasha (Beta) supporte toutes les paires de langues gérées par " +
 105+ " <a href=\"http://www.microsofttranslator.com/\" class=\"external\">Microsoft Translator</a>" +
 106+ " où la langue source est l'anlais<P><P>"
 107+ ],
 108+ nonWikiDomainMsg: "Choisissez un article valide de Wikipedia et lancez WikiBhasha.",
 109+ noSourceArticleFound: "Sur le Wikipedia anglais, WikiBhasha ne peut être utilisé que sur des articles existants.",
 110+ waitUntilTranslationComplete: "Patientez jusqu'à ce que la traduction soit complète.",
 111+ thanksMessage: "Merci pour votre contribution à Wikipedia. Voulez-vous nous donner votre avis ?",
 112+ nonEditableMessage: "WikiBhasha ne peut être utiliser que sur des articles éditable; celui-ci est protégé sur Wikipedia."
 113+ };
114114
115115 //short cut to call local strings
116116 wbLocal = wikiBhasha.localStrings;
Index: trunk/extensions/WikiBhasha/src/lang/de/strings.js
@@ -22,95 +22,95 @@
2323
2424 wikiBhasha.localStrings = {
2525
26 - failureMsg: "Unable to launch WikiBhasha\n",
27 - collaborativeTitle: "Welcome to WikiBhasha beta, a collaborative tool for enhancing multilingual content in Wikipedias.",
28 - collaborativeSearchTitle: "Please input terms to search for within English and the target language Wikipedias.",
29 - currentLanguage1: "You are currently on the",
30 - currentLanguage2: "article in the English Wikipedia.",
31 - exit: "Exit WikiBhasha",
32 - languageArticle: "Select the target language.",
33 - detectArticle: "This article does not exist in the target language Wikpedia. Please provide a title to create one.",
34 - existingtArticle: "This article already exists in the target language.",
35 - notApplicableStep: "This step in not applicable for current article.",
36 - important: "Important!",
37 - importantNote: "Please click on the \"WikiBhasha (Beta)\" bookmarklet again when you are in the target language Wikipedia!",
38 - contributeBtn: "Contribute to its version in another language",
39 - articleTitle: "Article Title",
40 - searchTabTitle: "Search for source article",
41 - contributeTo: "Enhance existing article in target language",
42 - create: "Create new article in the target langauge",
43 - space: " ",
44 - dot: ".",
45 - themeBlue: "Theme Blue",
46 - themeBlack: "Theme Black",
47 - themeSilver: "Theme Silver",
48 - help: "Help",
49 - maximize: "Maximize",
50 - close: "Close",
51 - sourceArticle: "Source Article",
52 - search: "Search",
53 - historyLabel: "Visited Topics",
54 - translate: "Translate to",
55 - scratchPad: "Scratch Pad",
56 - searchHeader: "Search",
57 - convertEntireArticle: "Get the entire article from Source",
58 - emptySearchResult: "There were no results matching the query.",
59 - english: "English",
60 - toText: "to",
61 - bringContentFromPane: "Bring the translated & corrected source content",
62 - articleAlreadyExists: "An article with title '{0}' already exists in target language Wikipedia, do you want to edit this page?",
63 - emptySearchResult: "There were no results matching the query.",
64 - emptySource: "No Inter-wiki-linked English article exists, for the topic you are working on currently. You may want to search for appropriate material using the ‘Search’ feature.",
65 - emptyInputText: "Please enter a valid text and continue.",
66 - unSupportedLanguage: "This target language is not currently supported in WikiBhasha.",
67 - invalidBookmarklet: "Please select appropriate book marklet",
68 - defaultLanguageText: "Select Language",
69 - warningMsg: "Please save your work",
70 - clearAll: "Clear All",
71 - sourceTextHeader: "Source Text",
72 - translatedTextHeader: "Translated Text",
73 - loadingElementContent: "Loading article...",
74 - sourceArticleNotApplicable: "Source langauge content is not applicable here.",
75 - scratchPadTextLimitConfirmMsg: "The entered text exceeds given limit of {0} characters.\n\nIf you continue to translate, it will discard the text that is beyond the limit",
76 - scratchPadTextLimitNote: "Maximum characters allowed per translation are {0} characters",
77 - feedbackTextLimitNote: "[Maximum of {0} characters]",
78 - feedbackThankYouMessage: "Thank you for the feedback.",
79 - feedbackErrorMessage: "Could not submit your feedback.<br/><br/>Click <a href='javascript:;' id='feedbackEmailLink'>here</a> to submit via e-mail.",
80 - feedbackEmptyTextAlertMessage: "Please select one option or enter some text in the provided text area.",
81 - warningSaveComposeChanges: "Any changes made in this step would be lost if you move to an earlier step. Do you want to move anyway?",
82 - noTargetLanguageArticleFound: "Linked article not found in target language Wikipedia.",
83 - feedbackQuestionMessage: "Before leaving WikiBhasha, would you like to give us feedback?",
84 - previewErrorMessage: "Unable to show the preview.",
85 - loadingPreviewContent: "Loading Preview...",
 26+ failureMsg: "Unable to launch WikiBhasha\n",
 27+ collaborativeTitle: "Welcome to WikiBhasha beta, a collaborative tool for enhancing multilingual content in Wikipedias.",
 28+ collaborativeSearchTitle: "Please input terms to search for within English and the target language Wikipedias.",
 29+ currentLanguage1: "You are currently on the",
 30+ currentLanguage2: "article in the English Wikipedia.",
 31+ exit: "Exit WikiBhasha",
 32+ languageArticle: "Select the target language.",
 33+ detectArticle: "This article does not exist in the target language Wikpedia. Please provide a title to create one.",
 34+ existingtArticle: "This article already exists in the target language.",
 35+ notApplicableStep: "This step in not applicable for current article.",
 36+ important: "Important!",
 37+ importantNote: "Please click on the \"WikiBhasha (Beta)\" bookmarklet again when you are in the target language Wikipedia!",
 38+ contributeBtn: "Contribute to its version in another language",
 39+ articleTitle: "Article Title",
 40+ searchTabTitle: "Search for source article",
 41+ contributeTo: "Enhance existing article in target language",
 42+ create: "Create new article in the target langauge",
 43+ space: " ",
 44+ dot: ".",
 45+ themeBlue: "Theme Blue",
 46+ themeBlack: "Theme Black",
 47+ themeSilver: "Theme Silver",
 48+ help: "Help",
 49+ maximize: "Maximize",
 50+ close: "Close",
 51+ sourceArticle: "Source Article",
 52+ search: "Search",
 53+ historyLabel: "Visited Topics",
 54+ translate: "Translate to",
 55+ scratchPad: "Scratch Pad",
 56+ searchHeader: "Search",
 57+ convertEntireArticle: "Get the entire article from Source",
 58+ emptySearchResult: "There were no results matching the query.",
 59+ english: "English",
 60+ toText: "to",
 61+ bringContentFromPane: "Bring the translated & corrected source content",
 62+ articleAlreadyExists: "An article with title '{0}' already exists in target language Wikipedia, do you want to edit this page?",
 63+ emptySearchResult: "There were no results matching the query.",
 64+ emptySource: "No Inter-wiki-linked English article exists, for the topic you are working on currently. You may want to search for appropriate material using the ‘Search’ feature.",
 65+ emptyInputText: "Please enter a valid text and continue.",
 66+ unSupportedLanguage: "This target language is not currently supported in WikiBhasha.",
 67+ invalidBookmarklet: "Please select appropriate book marklet",
 68+ defaultLanguageText: "Select Language",
 69+ warningMsg: "Please save your work",
 70+ clearAll: "Clear All",
 71+ sourceTextHeader: "Source Text",
 72+ translatedTextHeader: "Translated Text",
 73+ loadingElementContent: "Loading article...",
 74+ sourceArticleNotApplicable: "Source langauge content is not applicable here.",
 75+ scratchPadTextLimitConfirmMsg: "The entered text exceeds given limit of {0} characters.\n\nIf you continue to translate, it will discard the text that is beyond the limit",
 76+ scratchPadTextLimitNote: "Maximum characters allowed per translation are {0} characters",
 77+ feedbackTextLimitNote: "[Maximum of {0} characters]",
 78+ feedbackThankYouMessage: "Thank you for the feedback.",
 79+ feedbackErrorMessage: "Could not submit your feedback.<br/><br/>Click <a href='javascript:;' id='feedbackEmailLink'>here</a> to submit via e-mail.",
 80+ feedbackEmptyTextAlertMessage: "Please select one option or enter some text in the provided text area.",
 81+ warningSaveComposeChanges: "Any changes made in this step would be lost if you move to an earlier step. Do you want to move anyway?",
 82+ noTargetLanguageArticleFound: "Linked article not found in target language Wikipedia.",
 83+ feedbackQuestionMessage: "Before leaving WikiBhasha, would you like to give us feedback?",
 84+ previewErrorMessage: "Unable to show the preview.",
 85+ loadingPreviewContent: "Loading Preview...",
8686
87 - //tooptip strings
88 - searchInputTooltip: "Search",
89 - collapseTooltip: "Collapse",
90 - expandPaneTooltip: "Expand",
 87+ //tooptip strings
 88+ searchInputTooltip: "Search",
 89+ collapseTooltip: "Collapse",
 90+ expandPaneTooltip: "Expand",
9191
92 - //help tutorials array[slideNo,text]
93 - tutorials: ["Welcome to WikiBhasha beta, a collaborative tool that helps Wikipedia user communities enhance" +
94 - " content in their respective language Wikipedias. WikiBhasha started as a research project in" +
95 - " Microsoft Research. It is now being made available as an open source project on MediaWiki." +
96 - " The tools is also available as a user gadget in Wikipedia as well as a bookmarklet from" +
97 - " <a href=\"www.wikibhasha.org\">www.WikiBhasha.org</a>. Please comply with Wikipedia’s norms" +
98 - " for content contribution." +
99 - "<br><br>" +
100 - "Current WikiBhasha beta version: 1.0.0<br><br>" +
101 - "<a href=\"mailto:wikibfb@microsoft.com?subject=WikiBhasha beta Feedback\">Feedback to WikiBhasha team</a> welcome.",
102 - "<b>Supported Platforms: </b><P><P>\tIE 7/8 on Windows XP/Vista/Win7 and " +
103 - "Firefox 3.5 or above on Linux Fedora 11/12. " +
104 - "<b><P><P> Supported Languages: </b><P><P>\t" +
105 - "Currently WikiBhasha (Beta) supports all language pairs supported by" +
106 - " <a href=' http://www.microsofttranslator.com' target='_BLANK'>Microsoft Translator</a> (where" +
107 - " the source language is English)<P><P>"
108 - ],
109 - nonWikiDomainMsg: "Please select a valid article from wikipedia and invoke WikiBhasha.",
110 - noSourceArticleFound: "In English Wikipedia, WikiBhasha may be invoked only on an existing article.",
111 - waitUntilTranslationComplete: "Please wait till the translation completes.",
112 - thanksMessage: "Thank you for your contribution to Wikipedia. Would you like to give feedback?",
113 - nonEditableMessage: "WikiBhasha may be invoked only on editable articles; this article is protected in Wikipedia."
114 - }
 92+ //help tutorials array[slideNo,text]
 93+ tutorials: ["Welcome to WikiBhasha beta, a collaborative tool that helps Wikipedia user communities enhance" +
 94+ " content in their respective language Wikipedias. WikiBhasha started as a research project in" +
 95+ " Microsoft Research. It is now being made available as an open source project on MediaWiki." +
 96+ " The tools is also available as a user gadget in Wikipedia as well as a bookmarklet from" +
 97+ " <a href=\"www.wikibhasha.org\">www.WikiBhasha.org</a>. Please comply with Wikipedia’s norms" +
 98+ " for content contribution." +
 99+ "<br><br>" +
 100+ "Current WikiBhasha beta version: 1.0.0<br><br>" +
 101+ "<a href=\"mailto:wikibfb@microsoft.com?subject=WikiBhasha beta Feedback\">Feedback to WikiBhasha team</a> welcome.",
 102+ "<b>Supported Platforms: </b><P><P>\tIE 7/8 on Windows XP/Vista/Win7 and " +
 103+ "Firefox 3.5 or above on Linux Fedora 11/12. " +
 104+ "<b><P><P> Supported Languages: </b><P><P>\t" +
 105+ "Currently WikiBhasha (Beta) supports all language pairs supported by" +
 106+ " <a href=' http://www.microsofttranslator.com' target='_BLANK'>Microsoft Translator</a> (where" +
 107+ " the source language is English)<P><P>"
 108+ ],
 109+ nonWikiDomainMsg: "Please select a valid article from wikipedia and invoke WikiBhasha.",
 110+ noSourceArticleFound: "In English Wikipedia, WikiBhasha may be invoked only on an existing article.",
 111+ waitUntilTranslationComplete: "Please wait till the translation completes.",
 112+ thanksMessage: "Thank you for your contribution to Wikipedia. Would you like to give feedback?",
 113+ nonEditableMessage: "WikiBhasha may be invoked only on editable articles; this article is protected in Wikipedia."
 114+ };
115115
116116 //short cut to call local strings
117117 wbLocal = wikiBhasha.localStrings;
Index: trunk/extensions/WikiBhasha/src/js/main.js
@@ -335,7 +335,7 @@
336336 // NOTE: Never use any jQuery functions within this function.
337337 wikiBhasha.loadJQuery = function(callback) {
338338 if (typeof baseUrl != "undefined") {
339 - var script = document.createElement("script")
 339+ var script = document.createElement("script");
340340 script.type = "text/javascript";
341341 //check whether file is loaded or not if so, call the the 'callback' function
342342 //IE fix, in IE 'readyState' event is fired once the file is loaded
Index: trunk/extensions/WikiBhasha/src/js/jsLib/jquery.shortcut.js
@@ -6,7 +6,7 @@
77 */
88 jQuery.shortcut = {
99 'all_shortcuts':{},//All the shortcuts are stored in this array
10 - 'add': function(shortcut_combination,callback,opt) {
 10+ 'add': function(shortcut_combination, callback, opt) {
1111 //Provide a set of default options
1212 var default_options = {
1313 'type':'keydown',
@@ -14,44 +14,44 @@
1515 'disable_in_input':false,
1616 'target':document,
1717 'keycode':false
18 - }
19 - if(!opt) opt = default_options;
 18+ };
 19+ if (!opt) opt = default_options;
2020 else {
21 - for(var dfo in default_options) {
22 - if(typeof opt[dfo] == 'undefined') opt[dfo] = default_options[dfo];
 21+ for (var dfo in default_options) {
 22+ if (typeof opt[dfo] == 'undefined') opt[dfo] = default_options[dfo];
2323 }
2424 }
2525
2626 var ele = opt.target;
27 - if(typeof opt.target == 'string') ele = document.getElementById(opt.target);
 27+ if (typeof opt.target == 'string') ele = document.getElementById(opt.target);
2828 var ths = this;
2929 shortcut_combination = shortcut_combination.toLowerCase();
3030
3131 //The function to be called at keypress
3232 var func = function(e) {
3333 e = e || window.event;
34 -
35 - if(opt['disable_in_input']) { //Don't enable shortcut keys in Input, Textarea fields
 34+
 35+ if (opt['disable_in_input']) { //Don't enable shortcut keys in Input, Textarea fields
3636 var element;
37 - if(e.target) element=e.target;
38 - else if(e.srcElement) element=e.srcElement;
39 - if(element.nodeType==3) element=element.parentNode;
 37+ if (e.target) element = e.target;
 38+ else if (e.srcElement) element = e.srcElement;
 39+ if (element.nodeType == 3) element = element.parentNode;
4040
41 - if(element.tagName == 'INPUT' || element.tagName == 'TEXTAREA') return;
 41+ if (element.tagName == 'INPUT' || element.tagName == 'TEXTAREA') return;
4242 }
43 -
 43+
4444 //Find Which key is pressed
4545 if (e.keyCode) code = e.keyCode;
4646 else if (e.which) code = e.which;
4747 var character = String.fromCharCode(code).toLowerCase();
48 -
49 - if(code == 188) character=","; //If the user presses , when the type is onkeydown
50 - if(code == 190) character="."; //If the user presses , when the type is onkeydown
5148
 49+ if (code == 188) character = ","; //If the user presses , when the type is onkeydown
 50+ if (code == 190) character = "."; //If the user presses , when the type is onkeydown
 51+
5252 var keys = shortcut_combination.split("+");
5353 //Key Pressed - counts the number of valid keypresses - if it is same as the number of keys, the shortcut function is invoked
5454 var kp = 0;
55 -
 55+
5656 //Work around for stupid Shift key bug created by using lowercase - as a result the shift+num combination was broken
5757 var shift_nums = {
5858 "`":"~",
@@ -73,7 +73,7 @@
7474 ".":">",
7575 "/":"?",
7676 "\\":"|"
77 - }
 77+ };
7878 //Special Keys - and their codes
7979 var special_keys = {
8080 'esc':27,
@@ -83,7 +83,7 @@
8484 'return':13,
8585 'enter':13,
8686 'backspace':8,
87 -
 87+
8888 'scrolllock':145,
8989 'scroll_lock':145,
9090 'scroll':145,
@@ -93,28 +93,28 @@
9494 'numlock':144,
9595 'num_lock':144,
9696 'num':144,
97 -
 97+
9898 'pause':19,
9999 'break':19,
100 -
 100+
101101 'insert':45,
102102 'home':36,
103103 'delete':46,
104104 'end':35,
105 -
 105+
106106 'pageup':33,
107107 'page_up':33,
108108 'pu':33,
109 -
 109+
110110 'pagedown':34,
111111 'page_down':34,
112112 'pd':34,
113 -
 113+
114114 'left':37,
115115 'up':38,
116116 'right':39,
117117 'down':40,
118 -
 118+
119119 'f1':112,
120120 'f2':113,
121121 'f3':114,
@@ -127,65 +127,65 @@
128128 'f10':121,
129129 'f11':122,
130130 'f12':123
131 - }
132 -
133 - var modifiers = {
 131+ };
 132+
 133+ var modifiers = {
134134 shift: { wanted:false, pressed:false},
135135 ctrl : { wanted:false, pressed:false},
136136 alt : { wanted:false, pressed:false},
137137 meta : { wanted:false, pressed:false} //Meta is Mac specific
138138 };
139 -
140 - if(e.ctrlKey) modifiers.ctrl.pressed = true;
141 - if(e.shiftKey) modifiers.shift.pressed = true;
142 - if(e.altKey) modifiers.alt.pressed = true;
143 - if(e.metaKey) modifiers.meta.pressed = true;
144 -
145 - for(var i=0; k=keys[i],i<keys.length; i++) {
 139+
 140+ if (e.ctrlKey) modifiers.ctrl.pressed = true;
 141+ if (e.shiftKey) modifiers.shift.pressed = true;
 142+ if (e.altKey) modifiers.alt.pressed = true;
 143+ if (e.metaKey) modifiers.meta.pressed = true;
 144+
 145+ for (var i = 0; k = keys[i],i < keys.length; i++) {
146146 //Modifiers
147 - if(k == 'ctrl' || k == 'control') {
 147+ if (k == 'ctrl' || k == 'control') {
148148 kp++;
149149 modifiers.ctrl.wanted = true;
150150
151 - } else if(k == 'shift') {
 151+ } else if (k == 'shift') {
152152 kp++;
153153 modifiers.shift.wanted = true;
154154
155 - } else if(k == 'alt') {
 155+ } else if (k == 'alt') {
156156 kp++;
157157 modifiers.alt.wanted = true;
158 - } else if(k == 'meta') {
 158+ } else if (k == 'meta') {
159159 kp++;
160160 modifiers.meta.wanted = true;
161 - } else if(k.length > 1) { //If it is a special key
162 - if(special_keys[k] == code) kp++;
163 -
164 - } else if(opt['keycode']) {
165 - if(opt['keycode'] == code) kp++;
 161+ } else if (k.length > 1) { //If it is a special key
 162+ if (special_keys[k] == code) kp++;
166163
 164+ } else if (opt['keycode']) {
 165+ if (opt['keycode'] == code) kp++;
 166+
167167 } else { //The special keys did not match
168 - if(character == k) kp++;
 168+ if (character == k) kp++;
169169 else {
170 - if(shift_nums[character] && e.shiftKey) { //Stupid Shift key bug created by using lowercase
171 - character = shift_nums[character];
172 - if(character == k) kp++;
 170+ if (shift_nums[character] && e.shiftKey) { //Stupid Shift key bug created by using lowercase
 171+ character = shift_nums[character];
 172+ if (character == k) kp++;
173173 }
174174 }
175175 }
176176 }
177 -
178 - if(kp == keys.length &&
179 - modifiers.ctrl.pressed == modifiers.ctrl.wanted &&
180 - modifiers.shift.pressed == modifiers.shift.wanted &&
181 - modifiers.alt.pressed == modifiers.alt.wanted &&
182 - modifiers.meta.pressed == modifiers.meta.wanted) {
 177+
 178+ if (kp == keys.length &&
 179+ modifiers.ctrl.pressed == modifiers.ctrl.wanted &&
 180+ modifiers.shift.pressed == modifiers.shift.wanted &&
 181+ modifiers.alt.pressed == modifiers.alt.wanted &&
 182+ modifiers.meta.pressed == modifiers.meta.wanted) {
183183 callback(e);
184 -
185 - if(!opt['propagate']) { //Stop the event
 184+
 185+ if (!opt['propagate']) { //Stop the event
186186 //e.cancelBubble is supported by IE - this will kill the bubbling process.
187187 e.cancelBubble = true;
188188 e.returnValue = false;
189 -
 189+
190190 //e.stopPropagation works in Firefox.
191191 if (e.stopPropagation) {
192192 e.stopPropagation();
@@ -194,30 +194,30 @@
195195 return false;
196196 }
197197 }
198 - }
 198+ };
199199 this.all_shortcuts[shortcut_combination] = {
200 - 'callback':func,
201 - 'target':ele,
 200+ 'callback':func,
 201+ 'target':ele,
202202 'event': opt['type']
203203 };
204204 //Attach the function with the event
205 - if(ele.addEventListener) ele.addEventListener(opt['type'], func, false);
206 - else if(ele.attachEvent) ele.attachEvent('on'+opt['type'], func);
207 - else ele['on'+opt['type']] = func;
 205+ if (ele.addEventListener) ele.addEventListener(opt['type'], func, false);
 206+ else if (ele.attachEvent) ele.attachEvent('on' + opt['type'], func);
 207+ else ele['on' + opt['type']] = func;
208208 },
209209
210210 //Remove the shortcut - just specify the shortcut and I will remove the binding
211211 'remove':function(shortcut_combination) {
212212 shortcut_combination = shortcut_combination.toLowerCase();
213213 var binding = this.all_shortcuts[shortcut_combination];
214 - delete(this.all_shortcuts[shortcut_combination])
215 - if(!binding) return;
 214+ delete(this.all_shortcuts[shortcut_combination]);
 215+ if (!binding) return;
216216 var type = binding['event'];
217217 var ele = binding['target'];
218218 var callback = binding['callback'];
219219
220 - if(ele.detachEvent) ele.detachEvent('on'+type, callback);
221 - else if(ele.removeEventListener) ele.removeEventListener(type, callback, false);
222 - else ele['on'+type] = false;
 220+ if (ele.detachEvent) ele.detachEvent('on' + type, callback);
 221+ else if (ele.removeEventListener) ele.removeEventListener(type, callback, false);
 222+ else ele['on' + type] = false;
223223 }
224 -}
\ No newline at end of file
 224+};
\ No newline at end of file
Index: trunk/extensions/WikiBhasha/src/js/extern/wikipediaInterface.js
@@ -132,7 +132,7 @@
133133 this.getArticlePageId(sourceLanguage, sourceLanguageArticleTitle, function(pageID) {
134134 if (pageID) {
135135 $.getJSON(urlData, 'callback=?', function(data) {
136 - var langLinkList = data.query.pages[pageID].langlinks
 136+ var langLinkList = data.query.pages[pageID].langlinks;
137137 if (langLinkList) {
138138 for (i = 0; i < langLinkList.length; i++) {
139139 if (targetLanguage === langLinkList[i].lang) {
Index: trunk/extensions/WikiBhasha/src/js/core/styleBackgroundImages.js
@@ -25,233 +25,233 @@
2626 (function () {
2727 //includes all the methods and properties to manipulate themes of the application
2828 wikiBhasha.applyBackground = {
29 - //supported themes and their respective style sheets
30 - globalImages: {
31 - 'body': wbGlobalSettings.imgBaseUrl + 'images/bg.png',
32 - 'div.wbIndexHeader': wbGlobalSettings.imgBaseUrl + 'images/bg.png',
33 - '#wbSplashWindow': wbGlobalSettings.imgBaseUrl + 'images/loadingImage.png',
34 - '#wbContent': wbGlobalSettings.imgBaseUrl + 'images/selectionBg.png',
35 - '#wbFooterDiv': wbGlobalSettings.imgBaseUrl + 'images/selectionBgBottom.png',
36 - '#wbLogoContainer': wbGlobalSettings.imgBaseUrl + 'images/logoBlack.png',
37 - '#wbWindowTopLeft': wbGlobalSettings.imgBaseUrl + 'images/tabToolbarTopLeft.png',
38 - '.wbTrans': wbGlobalSettings.imgBaseUrl + 'images/trans.gif',
39 - '.wbWindowTopRight': wbGlobalSettings.imgBaseUrl + 'images/tabToolbarTopRight.png',
40 - '.wbWindowBottomLeft': wbGlobalSettings.imgBaseUrl + 'images/tabToolbarBottomLeft.png',
41 - '.wbWindowBottomRight': wbGlobalSettings.imgBaseUrl + 'images/tabToolbarBottomRight.png',
42 - 'a.wbSearchLink': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
43 - 'a.wbSearchLink:hover': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
44 - '.wbSearchExit': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
45 - 'a.wbExit': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
46 - '.workFlowBtnClicked': wbGlobalSettings.imgBaseUrl + 'images/button.gif',
47 - '#wbPreviousButton': wbGlobalSettings.imgBaseUrl + 'images/arrowLeft.png',
48 - '#wbPreviousButton:hover': wbGlobalSettings.imgBaseUrl + 'images/arrowLeftHoverState.png',
49 - '#wbNextButton': wbGlobalSettings.imgBaseUrl + 'images/arrowRight.png',
50 - '#wbNextButton:hover': wbGlobalSettings.imgBaseUrl + 'images/arrowRightHoverState.png',
51 - '.wbCollectNormal': wbGlobalSettings.imgBaseUrl + 'images/researchButton.png',
52 - '#wbCollectNormal:hover': wbGlobalSettings.imgBaseUrl + 'images/researchButtonActiveState.png',
53 - '.wbCollectActive': wbGlobalSettings.imgBaseUrl + 'images/researchButtonActiveState.png',
54 - '.wbComposeNormal': wbGlobalSettings.imgBaseUrl + 'images/composeButton.png',
55 - '.wbComposeNormal:hover': wbGlobalSettings.imgBaseUrl + 'images/composeButtonActiveState.png',
56 - '.wbComposeActive': wbGlobalSettings.imgBaseUrl + 'images/composeButtonActiveState.png',
57 - '.wbPublishNormal': wbGlobalSettings.imgBaseUrl + 'images/publishButton.png',
58 - '.wbPublishNormal:hover': wbGlobalSettings.imgBaseUrl + 'images/publishButtonActive.png',
59 - '.wbPublishActive': wbGlobalSettings.imgBaseUrl + 'images/publishButtonActive.png',
60 - '.wbLightBlueTitleBar': wbGlobalSettings.imgBaseUrl + 'images/titlebarBgLightBlue.png',
61 - '.wbLightYellowTitleBar': wbGlobalSettings.imgBaseUrl + 'images/titlebarBgLightYellow.png'
62 - },
63 - themeBlack: {
64 - '.wbBgTopRight': wbGlobalSettings.imgBaseUrl + 'images/themes/black/topRightCorner.png',
65 - '.wbBgTopLeft': wbGlobalSettings.imgBaseUrl + 'images/themes/black/topLeft.png',
66 - '.wbBgContentArea': wbGlobalSettings.imgBaseUrl + 'images/themes/black/bg.png',
67 - '.wbBgContentAreaRight': wbGlobalSettings.imgBaseUrl + 'images/themes/black/bgRight.png',
68 - '.wbBgBottomLeft': wbGlobalSettings.imgBaseUrl + 'images/themes/black/bottomLeft.png',
69 - '.wbBgBottomRight': wbGlobalSettings.imgBaseUrl + 'images/themes/black/bottomRightCorner.png',
70 - '.wbCollapseWindowToolbarCenter': wbGlobalSettings.imgBaseUrl + 'images/themes/black/toolbarBg.png',
71 - '.wbWindowTopLeft': wbGlobalSettings.imgBaseUrl + 'images/themes/black/tabToolbarTopLeft.png',
72 - '.wbWindowTopRight': wbGlobalSettings.imgBaseUrl + 'images/themes/black/tabToolbarTopRight.png',
73 - '.wbWindowToolbarLeft': wbGlobalSettings.imgBaseUrl + 'images/themes/black/toolbarBg.png',
74 - '.wbWindowToolbarCenter': wbGlobalSettings.imgBaseUrl + 'images/themes/black/toolbarBg.png',
75 - '.wbWindowToolbarRight': wbGlobalSettings.imgBaseUrl + 'images/themes/black/toolbarBg.png',
76 - '.wbWindowToolbarRight': wbGlobalSettings.imgBaseUrl + 'images/themes/black/toolbarBg.png',
77 - '.wbWindowBottomLeft': wbGlobalSettings.imgBaseUrl + 'images/themes/black/tabToolbarBottomLeft.png',
78 - '.wbWindowBottomRight': wbGlobalSettings.imgBaseUrl + 'images/themes/black/tabToolbarBottomRight.png',
79 - 'li.wbHeader': wbGlobalSettings.imgBaseUrl + 'images/themes/black/tabUnselectedLeft.png',
80 - 'li.wbLiright': wbGlobalSettings.imgBaseUrl + 'images/themes/black/tabUnselectedRight.png',
81 - 'li.wbSelected': wbGlobalSettings.imgBaseUrl + 'images/themes/black/tabSelectedLeft.png',
82 - 'li.wbSelectedright': wbGlobalSettings.imgBaseUrl + 'images/themes/black/tabSelectedRight.png',
83 - 'a.wbHelp': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
84 - 'a.wbMaximize': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
85 - 'a.wbMinimize': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
86 - 'a.wbClose': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
87 - 'a.wbDelete': wbGlobalSettings.imgBaseUrl + 'images/delete.png',
88 - 'a.wbBlueIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
89 - 'a.wbSilverIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
90 - 'a.wbBlackIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
91 - 'a.wbBlueSelectedIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
92 - 'a.wbSilverSelectedIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
93 - 'a.wbBlackSelectedIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
94 - 'a.wbSearchButton': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
95 - 'a.wbScratchPadButton': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
96 - 'a.wbFeedbackButton': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
97 - 'INPUT.wbTranslateButton': wbGlobalSettings.imgBaseUrl + 'images/translation.png',
98 - 'INPUT.wbClearButton': wbGlobalSettings.imgBaseUrl + 'images/clearAll.png',
99 - 'INPUT.wbButton': wbGlobalSettings.imgBaseUrl + 'images/wikiSmall.png',
100 - 'INPUT.wbGetEntireButton': wbGlobalSettings.imgBaseUrl + 'images/move.png',
101 - 'INPUT.wbCollapseButton': wbGlobalSettings.imgBaseUrl + 'images/collapse.png',
102 - 'INPUT.wbCollapseRightButton': wbGlobalSettings.imgBaseUrl + 'images/collapseRight.png',
103 - '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/page_white_edit.png',
104 - '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/cut.png',
105 - '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/page_white_copy.png',
106 - '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/page_white_paste.png',
107 - '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/page_white_delete.png',
108 - '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/door.png',
109 - '.wbTutorial': wbGlobalSettings.imgBaseUrl + 'images/logoBlack.png',
110 - '.wbTutorialPreviousBtn': wbGlobalSettings.imgBaseUrl + 'images/themes/black/previous.png',
111 - '.wbTutorialNextBtn': wbGlobalSettings.imgBaseUrl + 'images/themes/black/next.png',
112 - '.wbTutorialDisabledPreviousBtn': wbGlobalSettings.imgBaseUrl + 'images/disabledButtonPrevious.png',
113 - '.wbTutorialDisabledNextBtn': wbGlobalSettings.imgBaseUrl + 'images/disabledButtonNext.png',
114 - '.wbSplitter': wbGlobalSettings.imgBaseUrl + 'images/splitterImg.png',
115 - '.wbTutorialBgContentArea': wbGlobalSettings.imgBaseUrl + 'images/themes/black/helpBg.png'
116 - },
 29+ //supported themes and their respective style sheets
 30+ globalImages: {
 31+ 'body': wbGlobalSettings.imgBaseUrl + 'images/bg.png',
 32+ 'div.wbIndexHeader': wbGlobalSettings.imgBaseUrl + 'images/bg.png',
 33+ '#wbSplashWindow': wbGlobalSettings.imgBaseUrl + 'images/loadingImage.png',
 34+ '#wbContent': wbGlobalSettings.imgBaseUrl + 'images/selectionBg.png',
 35+ '#wbFooterDiv': wbGlobalSettings.imgBaseUrl + 'images/selectionBgBottom.png',
 36+ '#wbLogoContainer': wbGlobalSettings.imgBaseUrl + 'images/logoBlack.png',
 37+ '#wbWindowTopLeft': wbGlobalSettings.imgBaseUrl + 'images/tabToolbarTopLeft.png',
 38+ '.wbTrans': wbGlobalSettings.imgBaseUrl + 'images/trans.gif',
 39+ '.wbWindowTopRight': wbGlobalSettings.imgBaseUrl + 'images/tabToolbarTopRight.png',
 40+ '.wbWindowBottomLeft': wbGlobalSettings.imgBaseUrl + 'images/tabToolbarBottomLeft.png',
 41+ '.wbWindowBottomRight': wbGlobalSettings.imgBaseUrl + 'images/tabToolbarBottomRight.png',
 42+ 'a.wbSearchLink': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 43+ 'a.wbSearchLink:hover': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 44+ '.wbSearchExit': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 45+ 'a.wbExit': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 46+ '.workFlowBtnClicked': wbGlobalSettings.imgBaseUrl + 'images/button.gif',
 47+ '#wbPreviousButton': wbGlobalSettings.imgBaseUrl + 'images/arrowLeft.png',
 48+ '#wbPreviousButton:hover': wbGlobalSettings.imgBaseUrl + 'images/arrowLeftHoverState.png',
 49+ '#wbNextButton': wbGlobalSettings.imgBaseUrl + 'images/arrowRight.png',
 50+ '#wbNextButton:hover': wbGlobalSettings.imgBaseUrl + 'images/arrowRightHoverState.png',
 51+ '.wbCollectNormal': wbGlobalSettings.imgBaseUrl + 'images/researchButton.png',
 52+ '#wbCollectNormal:hover': wbGlobalSettings.imgBaseUrl + 'images/researchButtonActiveState.png',
 53+ '.wbCollectActive': wbGlobalSettings.imgBaseUrl + 'images/researchButtonActiveState.png',
 54+ '.wbComposeNormal': wbGlobalSettings.imgBaseUrl + 'images/composeButton.png',
 55+ '.wbComposeNormal:hover': wbGlobalSettings.imgBaseUrl + 'images/composeButtonActiveState.png',
 56+ '.wbComposeActive': wbGlobalSettings.imgBaseUrl + 'images/composeButtonActiveState.png',
 57+ '.wbPublishNormal': wbGlobalSettings.imgBaseUrl + 'images/publishButton.png',
 58+ '.wbPublishNormal:hover': wbGlobalSettings.imgBaseUrl + 'images/publishButtonActive.png',
 59+ '.wbPublishActive': wbGlobalSettings.imgBaseUrl + 'images/publishButtonActive.png',
 60+ '.wbLightBlueTitleBar': wbGlobalSettings.imgBaseUrl + 'images/titlebarBgLightBlue.png',
 61+ '.wbLightYellowTitleBar': wbGlobalSettings.imgBaseUrl + 'images/titlebarBgLightYellow.png'
 62+ },
 63+ themeBlack: {
 64+ '.wbBgTopRight': wbGlobalSettings.imgBaseUrl + 'images/themes/black/topRightCorner.png',
 65+ '.wbBgTopLeft': wbGlobalSettings.imgBaseUrl + 'images/themes/black/topLeft.png',
 66+ '.wbBgContentArea': wbGlobalSettings.imgBaseUrl + 'images/themes/black/bg.png',
 67+ '.wbBgContentAreaRight': wbGlobalSettings.imgBaseUrl + 'images/themes/black/bgRight.png',
 68+ '.wbBgBottomLeft': wbGlobalSettings.imgBaseUrl + 'images/themes/black/bottomLeft.png',
 69+ '.wbBgBottomRight': wbGlobalSettings.imgBaseUrl + 'images/themes/black/bottomRightCorner.png',
 70+ '.wbCollapseWindowToolbarCenter': wbGlobalSettings.imgBaseUrl + 'images/themes/black/toolbarBg.png',
 71+ '.wbWindowTopLeft': wbGlobalSettings.imgBaseUrl + 'images/themes/black/tabToolbarTopLeft.png',
 72+ '.wbWindowTopRight': wbGlobalSettings.imgBaseUrl + 'images/themes/black/tabToolbarTopRight.png',
 73+ '.wbWindowToolbarLeft': wbGlobalSettings.imgBaseUrl + 'images/themes/black/toolbarBg.png',
 74+ '.wbWindowToolbarCenter': wbGlobalSettings.imgBaseUrl + 'images/themes/black/toolbarBg.png',
 75+ '.wbWindowToolbarRight': wbGlobalSettings.imgBaseUrl + 'images/themes/black/toolbarBg.png',
 76+ '.wbWindowToolbarRight': wbGlobalSettings.imgBaseUrl + 'images/themes/black/toolbarBg.png',
 77+ '.wbWindowBottomLeft': wbGlobalSettings.imgBaseUrl + 'images/themes/black/tabToolbarBottomLeft.png',
 78+ '.wbWindowBottomRight': wbGlobalSettings.imgBaseUrl + 'images/themes/black/tabToolbarBottomRight.png',
 79+ 'li.wbHeader': wbGlobalSettings.imgBaseUrl + 'images/themes/black/tabUnselectedLeft.png',
 80+ 'li.wbLiright': wbGlobalSettings.imgBaseUrl + 'images/themes/black/tabUnselectedRight.png',
 81+ 'li.wbSelected': wbGlobalSettings.imgBaseUrl + 'images/themes/black/tabSelectedLeft.png',
 82+ 'li.wbSelectedright': wbGlobalSettings.imgBaseUrl + 'images/themes/black/tabSelectedRight.png',
 83+ 'a.wbHelp': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 84+ 'a.wbMaximize': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 85+ 'a.wbMinimize': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 86+ 'a.wbClose': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 87+ 'a.wbDelete': wbGlobalSettings.imgBaseUrl + 'images/delete.png',
 88+ 'a.wbBlueIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 89+ 'a.wbSilverIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 90+ 'a.wbBlackIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 91+ 'a.wbBlueSelectedIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 92+ 'a.wbSilverSelectedIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 93+ 'a.wbBlackSelectedIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 94+ 'a.wbSearchButton': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 95+ 'a.wbScratchPadButton': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 96+ 'a.wbFeedbackButton': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 97+ 'INPUT.wbTranslateButton': wbGlobalSettings.imgBaseUrl + 'images/translation.png',
 98+ 'INPUT.wbClearButton': wbGlobalSettings.imgBaseUrl + 'images/clearAll.png',
 99+ 'INPUT.wbButton': wbGlobalSettings.imgBaseUrl + 'images/wikiSmall.png',
 100+ 'INPUT.wbGetEntireButton': wbGlobalSettings.imgBaseUrl + 'images/move.png',
 101+ 'INPUT.wbCollapseButton': wbGlobalSettings.imgBaseUrl + 'images/collapse.png',
 102+ 'INPUT.wbCollapseRightButton': wbGlobalSettings.imgBaseUrl + 'images/collapseRight.png',
 103+ '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/page_white_edit.png',
 104+ '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/cut.png',
 105+ '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/page_white_copy.png',
 106+ '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/page_white_paste.png',
 107+ '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/page_white_delete.png',
 108+ '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/door.png',
 109+ '.wbTutorial': wbGlobalSettings.imgBaseUrl + 'images/logoBlack.png',
 110+ '.wbTutorialPreviousBtn': wbGlobalSettings.imgBaseUrl + 'images/themes/black/previous.png',
 111+ '.wbTutorialNextBtn': wbGlobalSettings.imgBaseUrl + 'images/themes/black/next.png',
 112+ '.wbTutorialDisabledPreviousBtn': wbGlobalSettings.imgBaseUrl + 'images/disabledButtonPrevious.png',
 113+ '.wbTutorialDisabledNextBtn': wbGlobalSettings.imgBaseUrl + 'images/disabledButtonNext.png',
 114+ '.wbSplitter': wbGlobalSettings.imgBaseUrl + 'images/splitterImg.png',
 115+ '.wbTutorialBgContentArea': wbGlobalSettings.imgBaseUrl + 'images/themes/black/helpBg.png'
 116+ },
117117
118 - themeSilver: {
119 - '.wbBgTopRight': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/topRightCorner.png',
120 - '.wbBgTopLeft': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/topLeft.png',
121 - '.wbBgContentArea': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/bg.png',
122 - '.wbBgContentAreaRight': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/bgRight.png',
123 - '.wbBgBottomLeft': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/bottomLeft.png',
124 - '.wbBgBottomRight': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/bottomRightCorner.png',
125 - '.wbCollapseWindowToolbarCenter': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/toolbarBg.png',
126 - '.wbWindowTopLeft': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/tabToolbarTopLeft.png',
127 - '.wbWindowTopRight': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/tabToolbarTopRight.png',
128 - '.wbWindowToolbarLeft': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/toolbarBg.png',
129 - '.wbWindowToolbarCenter': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/toolbarBg.png',
130 - '.wbWindowToolbarRight': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/toolbarBg.png',
131 - '.wbWindowToolbarRight': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/toolbarBg.png',
132 - '.wbWindowBottomLeft': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/tabToolbarBottomLeft.png',
133 - '.wbWindowBottomRight': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/tabToolbarBottomRight.png',
134 - 'li.wbHeader': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/tabUnselectedLeft.png',
135 - 'li.wbLiright': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/tabUnselectedRight.png',
136 - 'li.wbSelected': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/tabSelectedLeft.png',
137 - 'li.wbSelectedright': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/tabSelectedRight.png',
138 - 'a.wbHelp': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
139 - 'a.wbMaximize': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
140 - 'a.wbMinimize': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
141 - 'a.wbClose': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
142 - 'a.wbDelete': wbGlobalSettings.imgBaseUrl + 'images/delete.png',
143 - 'a.wbBlueIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
144 - 'a.wbSilverIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
145 - 'a.wbBlackIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
146 - 'a.wbBlueSelectedIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
147 - 'a.wbSilverSelectedIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
148 - 'a.wbBlackSelectedIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
149 - 'a.wbSearchButton': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
150 - 'a.wbScratchPadButton': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
151 - 'a.wbFeedbackButton': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
152 - 'INPUT.wbTranslateButton': wbGlobalSettings.imgBaseUrl + 'images/translation.png',
153 - 'INPUT.wbClearButton': wbGlobalSettings.imgBaseUrl + 'images/clearAll.png',
154 - 'INPUT.wbButton': wbGlobalSettings.imgBaseUrl + 'images/wikiSmall.png',
155 - 'INPUT.wbGetEntireButton': wbGlobalSettings.imgBaseUrl + 'images/move.png',
156 - 'INPUT.wbCollapseButton': wbGlobalSettings.imgBaseUrl + 'images/collapse.png',
157 - 'INPUT.wbCollapseRightButton': wbGlobalSettings.imgBaseUrl + 'images/collapseRight.png',
158 - '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/page_white_edit.png',
159 - '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/cut.png',
160 - '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/page_white_copy.png',
161 - '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/page_white_paste.png',
162 - '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/page_white_delete.png',
163 - '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/door.png',
164 - '.wbTutorial': wbGlobalSettings.imgBaseUrl + 'images/logoBlack.png',
165 - '.wbTutorialPreviousBtn': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/previous.png',
166 - '.wbTutorialNextBtn': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/next.png',
167 - '.wbTutorialDisabledPreviousBtn': wbGlobalSettings.imgBaseUrl + 'images/disabledButtonPrevious.png',
168 - '.wbTutorialDisabledNextBtn': wbGlobalSettings.imgBaseUrl + 'images/disabledButtonNext.png',
169 - '.wbSplitter': wbGlobalSettings.imgBaseUrl + 'images/splitterImg.png',
170 - '.wbTutorialBgContentArea': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/helpBg.png'
171 - },
 118+ themeSilver: {
 119+ '.wbBgTopRight': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/topRightCorner.png',
 120+ '.wbBgTopLeft': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/topLeft.png',
 121+ '.wbBgContentArea': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/bg.png',
 122+ '.wbBgContentAreaRight': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/bgRight.png',
 123+ '.wbBgBottomLeft': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/bottomLeft.png',
 124+ '.wbBgBottomRight': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/bottomRightCorner.png',
 125+ '.wbCollapseWindowToolbarCenter': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/toolbarBg.png',
 126+ '.wbWindowTopLeft': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/tabToolbarTopLeft.png',
 127+ '.wbWindowTopRight': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/tabToolbarTopRight.png',
 128+ '.wbWindowToolbarLeft': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/toolbarBg.png',
 129+ '.wbWindowToolbarCenter': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/toolbarBg.png',
 130+ '.wbWindowToolbarRight': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/toolbarBg.png',
 131+ '.wbWindowToolbarRight': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/toolbarBg.png',
 132+ '.wbWindowBottomLeft': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/tabToolbarBottomLeft.png',
 133+ '.wbWindowBottomRight': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/tabToolbarBottomRight.png',
 134+ 'li.wbHeader': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/tabUnselectedLeft.png',
 135+ 'li.wbLiright': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/tabUnselectedRight.png',
 136+ 'li.wbSelected': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/tabSelectedLeft.png',
 137+ 'li.wbSelectedright': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/tabSelectedRight.png',
 138+ 'a.wbHelp': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 139+ 'a.wbMaximize': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 140+ 'a.wbMinimize': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 141+ 'a.wbClose': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 142+ 'a.wbDelete': wbGlobalSettings.imgBaseUrl + 'images/delete.png',
 143+ 'a.wbBlueIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 144+ 'a.wbSilverIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 145+ 'a.wbBlackIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 146+ 'a.wbBlueSelectedIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 147+ 'a.wbSilverSelectedIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 148+ 'a.wbBlackSelectedIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 149+ 'a.wbSearchButton': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 150+ 'a.wbScratchPadButton': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 151+ 'a.wbFeedbackButton': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 152+ 'INPUT.wbTranslateButton': wbGlobalSettings.imgBaseUrl + 'images/translation.png',
 153+ 'INPUT.wbClearButton': wbGlobalSettings.imgBaseUrl + 'images/clearAll.png',
 154+ 'INPUT.wbButton': wbGlobalSettings.imgBaseUrl + 'images/wikiSmall.png',
 155+ 'INPUT.wbGetEntireButton': wbGlobalSettings.imgBaseUrl + 'images/move.png',
 156+ 'INPUT.wbCollapseButton': wbGlobalSettings.imgBaseUrl + 'images/collapse.png',
 157+ 'INPUT.wbCollapseRightButton': wbGlobalSettings.imgBaseUrl + 'images/collapseRight.png',
 158+ '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/page_white_edit.png',
 159+ '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/cut.png',
 160+ '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/page_white_copy.png',
 161+ '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/page_white_paste.png',
 162+ '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/page_white_delete.png',
 163+ '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/door.png',
 164+ '.wbTutorial': wbGlobalSettings.imgBaseUrl + 'images/logoBlack.png',
 165+ '.wbTutorialPreviousBtn': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/previous.png',
 166+ '.wbTutorialNextBtn': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/next.png',
 167+ '.wbTutorialDisabledPreviousBtn': wbGlobalSettings.imgBaseUrl + 'images/disabledButtonPrevious.png',
 168+ '.wbTutorialDisabledNextBtn': wbGlobalSettings.imgBaseUrl + 'images/disabledButtonNext.png',
 169+ '.wbSplitter': wbGlobalSettings.imgBaseUrl + 'images/splitterImg.png',
 170+ '.wbTutorialBgContentArea': wbGlobalSettings.imgBaseUrl + 'images/themes/silver/helpBg.png'
 171+ },
172172
173 - themeBlue: {
174 - '.wbBgTopRight': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/topRightCorner.png',
175 - '.wbBgTopLeft': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/topLeft.png',
176 - '.wbBgContentArea': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/bg.png',
177 - '.wbBgContentAreaRight': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/bgRight.png',
178 - '.wbBgBottomLeft': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/bottomLeft.png',
179 - '.wbBgBottomRight': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/bottomRightCorner.png',
180 - '.wbCollapseWindowToolbarCenter': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/toolbarBg.png',
181 - '.wbWindowTopLeft': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/tabToolbarTopLeft.png',
182 - '.wbWindowTopRight': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/tabToolbarTopRight.png',
183 - '.wbWindowToolbarLeft': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/toolbarBg.png',
184 - '.wbWindowToolbarCenter': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/toolbarBg.png',
185 - '.wbWindowToolbarRight': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/toolbarBg.png',
186 - '.wbWindowToolbarRight': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/toolbarBg.png',
187 - '.wbWindowBottomLeft': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/tabToolbarBottomLeft.png',
188 - '.wbWindowBottomRight': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/tabToolbarBottomRight.png',
189 - 'li.wbHeader': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/tabUnselectedLeft.png',
190 - 'li.wbLiright': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/tabUnselectedRight.png',
191 - 'li.wbSelected': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/tabSelectedLeft.png',
192 - 'li.wbSelectedright': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/tabSelectedRight.png',
193 - 'a.wbHelp': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
194 - 'a.wbMaximize': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
195 - 'a.wbMinimize': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
196 - 'a.wbClose': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
197 - 'a.wbDelete': wbGlobalSettings.imgBaseUrl + 'images/delete.png',
198 - 'a.wbBlueIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
199 - 'a.wbSilverIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
200 - 'a.wbBlackIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
201 - 'a.wbBlueSelectedIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
202 - 'a.wbSilverSelectedIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
203 - 'a.wbBlackSelectedIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
204 - 'a.wbSearchButton': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
205 - 'a.wbScratchPadButton': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
206 - 'a.wbFeedbackButton': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
207 - 'INPUT.wbTranslateButton': wbGlobalSettings.imgBaseUrl + 'images/translation.png',
208 - 'INPUT.wbClearButton': wbGlobalSettings.imgBaseUrl + 'images/clearAll.png',
209 - 'INPUT.wbButton': wbGlobalSettings.imgBaseUrl + 'images/wikiSmall.png',
210 - 'INPUT.wbGetEntireButton': wbGlobalSettings.imgBaseUrl + 'images/move.png',
211 - 'INPUT.wbCollapseButton': wbGlobalSettings.imgBaseUrl + 'images/collapse.png',
212 - 'INPUT.wbCollapseRightButton': wbGlobalSettings.imgBaseUrl + 'images/collapseRight.png',
213 - '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/page_white_edit.png',
214 - '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/cut.png',
215 - '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/page_white_copy.png',
216 - '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/page_white_paste.png',
217 - '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/page_white_delete.png',
218 - '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/door.png',
219 - '.wbTutorial': wbGlobalSettings.imgBaseUrl + 'images/logoBlack.png',
220 - '.wbTutorialPreviousBtn': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/previous.png',
221 - '.wbTutorialNextBtn': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/next.png',
222 - '.wbTutorialDisabledPreviousBtn': wbGlobalSettings.imgBaseUrl + 'images/disabledButtonPrevious.png',
223 - '.wbTutorialDisabledNextBtn': wbGlobalSettings.imgBaseUrl + 'images/disabledButtonNext.png',
224 - '.wbSplitter': wbGlobalSettings.imgBaseUrl + 'images/splitterImg.png',
225 - '.wbTutorialBgContentArea': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/helpBg.png'
226 - },
 173+ themeBlue: {
 174+ '.wbBgTopRight': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/topRightCorner.png',
 175+ '.wbBgTopLeft': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/topLeft.png',
 176+ '.wbBgContentArea': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/bg.png',
 177+ '.wbBgContentAreaRight': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/bgRight.png',
 178+ '.wbBgBottomLeft': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/bottomLeft.png',
 179+ '.wbBgBottomRight': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/bottomRightCorner.png',
 180+ '.wbCollapseWindowToolbarCenter': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/toolbarBg.png',
 181+ '.wbWindowTopLeft': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/tabToolbarTopLeft.png',
 182+ '.wbWindowTopRight': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/tabToolbarTopRight.png',
 183+ '.wbWindowToolbarLeft': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/toolbarBg.png',
 184+ '.wbWindowToolbarCenter': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/toolbarBg.png',
 185+ '.wbWindowToolbarRight': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/toolbarBg.png',
 186+ '.wbWindowToolbarRight': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/toolbarBg.png',
 187+ '.wbWindowBottomLeft': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/tabToolbarBottomLeft.png',
 188+ '.wbWindowBottomRight': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/tabToolbarBottomRight.png',
 189+ 'li.wbHeader': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/tabUnselectedLeft.png',
 190+ 'li.wbLiright': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/tabUnselectedRight.png',
 191+ 'li.wbSelected': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/tabSelectedLeft.png',
 192+ 'li.wbSelectedright': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/tabSelectedRight.png',
 193+ 'a.wbHelp': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 194+ 'a.wbMaximize': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 195+ 'a.wbMinimize': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 196+ 'a.wbClose': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 197+ 'a.wbDelete': wbGlobalSettings.imgBaseUrl + 'images/delete.png',
 198+ 'a.wbBlueIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 199+ 'a.wbSilverIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 200+ 'a.wbBlackIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 201+ 'a.wbBlueSelectedIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 202+ 'a.wbSilverSelectedIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 203+ 'a.wbBlackSelectedIcon': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 204+ 'a.wbSearchButton': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 205+ 'a.wbScratchPadButton': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 206+ 'a.wbFeedbackButton': wbGlobalSettings.imgBaseUrl + 'images/TopRightIconSpriteSquare.png',
 207+ 'INPUT.wbTranslateButton': wbGlobalSettings.imgBaseUrl + 'images/translation.png',
 208+ 'INPUT.wbClearButton': wbGlobalSettings.imgBaseUrl + 'images/clearAll.png',
 209+ 'INPUT.wbButton': wbGlobalSettings.imgBaseUrl + 'images/wikiSmall.png',
 210+ 'INPUT.wbGetEntireButton': wbGlobalSettings.imgBaseUrl + 'images/move.png',
 211+ 'INPUT.wbCollapseButton': wbGlobalSettings.imgBaseUrl + 'images/collapse.png',
 212+ 'INPUT.wbCollapseRightButton': wbGlobalSettings.imgBaseUrl + 'images/collapseRight.png',
 213+ '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/page_white_edit.png',
 214+ '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/cut.png',
 215+ '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/page_white_copy.png',
 216+ '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/page_white_paste.png',
 217+ '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/page_white_delete.png',
 218+ '.wbContextMenu': wbGlobalSettings.imgBaseUrl + 'images/door.png',
 219+ '.wbTutorial': wbGlobalSettings.imgBaseUrl + 'images/logoBlack.png',
 220+ '.wbTutorialPreviousBtn': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/previous.png',
 221+ '.wbTutorialNextBtn': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/next.png',
 222+ '.wbTutorialDisabledPreviousBtn': wbGlobalSettings.imgBaseUrl + 'images/disabledButtonPrevious.png',
 223+ '.wbTutorialDisabledNextBtn': wbGlobalSettings.imgBaseUrl + 'images/disabledButtonNext.png',
 224+ '.wbSplitter': wbGlobalSettings.imgBaseUrl + 'images/splitterImg.png',
 225+ '.wbTutorialBgContentArea': wbGlobalSettings.imgBaseUrl + 'images/themes/blue/helpBg.png'
 226+ },
227227
228 - //bind the click event on available theme buttons
229 - loadBackgroundImages: function (imagesListObject) {
230 - if (imagesListObject) {
231 - for (var key in imagesListObject) {
232 - $(key).css("background-image", "url(" + imagesListObject[key] + ")");
233 - }
234 - }
235 - },
 228+ //bind the click event on available theme buttons
 229+ loadBackgroundImages: function (imagesListObject) {
 230+ if (imagesListObject) {
 231+ for (var key in imagesListObject) {
 232+ $(key).css("background-image", "url(" + imagesListObject[key] + ")");
 233+ }
 234+ }
 235+ },
236236
237 - changeImagePath: function (theme) {
238 - wbImageRef.loadBackgroundImages(wbImageRef.globalImages);
239 - switch (theme) {
240 - case 'Black':
241 - {
242 - wbImageRef.loadBackgroundImages(wbImageRef.themeBlack);
243 - } break;
244 - case 'Silver':
245 - {
246 - wbImageRef.loadBackgroundImages(wbImageRef.themeSilver);
247 - } break;
248 - case 'Blue':
249 - default:
250 - {
251 - wbImageRef.loadBackgroundImages(wbImageRef.themeBlue);
252 - }
253 - }
254 - }
255 - }
 237+ changeImagePath: function (theme) {
 238+ wbImageRef.loadBackgroundImages(wbImageRef.globalImages);
 239+ switch (theme) {
 240+ case 'Black':
 241+ {
 242+ wbImageRef.loadBackgroundImages(wbImageRef.themeBlack);
 243+ } break;
 244+ case 'Silver':
 245+ {
 246+ wbImageRef.loadBackgroundImages(wbImageRef.themeSilver);
 247+ } break;
 248+ case 'Blue':
 249+ default:
 250+ {
 251+ wbImageRef.loadBackgroundImages(wbImageRef.themeBlue);
 252+ }
 253+ }
 254+ }
 255+ };
256256
257257 //shortcut to call wikiBhasha.applyBackground
258258 wbImageRef = wikiBhasha.applyBackground;
Index: trunk/extensions/WikiBhasha/src/js/core/templateAndLinkTranslator.js
@@ -40,328 +40,329 @@
4141
4242 wikiBhasha.contentManagement.templatesAndLinksTranslator = function (contentDiv, targetLanguage, wikiText) {
4343
44 - // Public members of class
45 - // Does translation of templates from templates mapper. Typically done before the
46 - // language translation happens.
47 - this.translateTemplatesOnWikiTextBeforeTranslation = function () {
48 - replaceParameterizedTemplates();
49 - };
 44+ // Public members of class
 45+ // Does translation of templates from templates mapper. Typically done before the
 46+ // language translation happens.
 47+ this.translateTemplatesOnWikiTextBeforeTranslation = function () {
 48+ replaceParameterizedTemplates();
 49+ };
5050
51 - // Starts the asynchornous interwiki conversion.
52 - this.startInterwikiConversion = function () {
53 - getLinksToTranslate();
54 - getTemplatesToTranslate();
55 - dispatchLinksToApiForTranslation();
56 - };
 51+ // Starts the asynchornous interwiki conversion.
 52+ this.startInterwikiConversion = function () {
 53+ getLinksToTranslate();
 54+ getTemplatesToTranslate();
 55+ dispatchLinksToApiForTranslation();
 56+ };
5757
58 - // Private members
59 - var templatesToTranslate = null,
60 - linksToTranslate = null;
 58+ // Private members
 59+ var templatesToTranslate = null,
 60+ linksToTranslate = null;
6161
62 - // Looks for all templates declared in source contentDiv and adds them to
63 - // templatesToTranslate array.
64 - function getTemplatesToTranslate() {
65 - if (templatesToTranslate) {
66 - return;
67 - }
68 - templatesToTranslate = {};
69 - // Get only templates with no parameters
70 - var regex = /{{([^|\}\<]+)}}/g,
71 - match;
72 - while (match = regex.exec(wikiText)) {
73 - var $template = $.trim(match[1]);
74 - templatesToTranslate["Template:" + $template] = null;
75 - }
76 - }
 62+ // Looks for all templates declared in source contentDiv and adds them to
 63+ // templatesToTranslate array.
 64+ function getTemplatesToTranslate() {
 65+ if (templatesToTranslate) {
 66+ return;
 67+ }
 68+ templatesToTranslate = {};
 69+ // Get only templates with no parameters
 70+ var regex = /{{([^|\}\<]+)}}/g,
 71+ match;
 72+ while (match = regex.exec(wikiText)) {
 73+ var $template = $.trim(match[1]);
 74+ templatesToTranslate["Template:" + $template] = null;
 75+ }
 76+ }
7777
78 - // Looks for all links declared in source contentDiv and adds them to
79 - // linksToTranslate array.
80 - function getLinksToTranslate(text) {
81 - if (linksToTranslate) {
82 - return;
83 - }
84 - linksToTranslate = {};
 78+ // Looks for all links declared in source contentDiv and adds them to
 79+ // linksToTranslate array.
 80+ function getLinksToTranslate(text) {
 81+ if (linksToTranslate) {
 82+ return;
 83+ }
 84+ linksToTranslate = {};
8585
86 - var regex = /\[\[([^|\]\:]+)(\|([^|\]\:]+))?\]\]*/g,
87 - match;
88 - while (match = regex.exec(wikiText)) {
89 - var link = $.trim(match[1]);
90 - linksToTranslate[link] = null;
91 - }
92 - }
 86+ var regex = /\[\[([^|\]\:]+)(\|([^|\]\:]+))?\]\]*/g,
 87+ match;
 88+ while (match = regex.exec(wikiText)) {
 89+ var link = $.trim(match[1]);
 90+ linksToTranslate[link] = null;
 91+ }
 92+ }
9393
94 - // Utility function to get all properties of an object as an array
95 - function getObjectPropertiesToArray(object) {
96 - var ret = [];
97 - for (var prop in object) {
98 - ret.push(prop);
99 - }
100 - return ret;
101 - }
 94+ // Utility function to get all properties of an object as an array
 95+ function getObjectPropertiesToArray(object) {
 96+ var ret = [];
 97+ for (var prop in object) {
 98+ ret.push(prop);
 99+ }
 100+ return ret;
 101+ }
102102
103 - // Splits the given array into array of arrays (array or pages) with each
104 - // page having max pageSize items.
105 - function splitArrayIntoPages(inputArray, pageSize) {
106 - var pagesArray = [],
107 - currentPageArray = [],
108 - positionIndex = 0;
109 - for (var i = 0, len = inputArray.length; i < len; i++) {
110 - currentPageArray[positionIndex++] = inputArray[i];
111 - if (positionIndex === pageSize) {
112 - pagesArray.push(currentPageArray);
113 - currentPageArray = [];
114 - positionIndex = 0;
115 - }
116 - }
117 - if (positionIndex > 0) {
118 - pagesArray.push(currentPageArray);
119 - }
120 - return pagesArray;
121 - }
 103+ // Splits the given array into array of arrays (array or pages) with each
 104+ // page having max pageSize items.
 105+ function splitArrayIntoPages(inputArray, pageSize) {
 106+ var pagesArray = [],
 107+ currentPageArray = [],
 108+ positionIndex = 0;
 109+ for (var i = 0, len = inputArray.length; i < len; i++) {
 110+ currentPageArray[positionIndex++] = inputArray[i];
 111+ if (positionIndex === pageSize) {
 112+ pagesArray.push(currentPageArray);
 113+ currentPageArray = [];
 114+ positionIndex = 0;
 115+ }
 116+ }
 117+ if (positionIndex > 0) {
 118+ pagesArray.push(currentPageArray);
 119+ }
 120+ return pagesArray;
 121+ }
122122
123 - // Replaces the passed old link/template with new link/template in
124 - // templatesToTranslate or linksToTranslate collection
125 - function replaceLinkOrTemplate(oldValue, newValue) {
126 - var isTemplate = /^Template:/.test(oldValue),
127 - mapObject = (isTemplate) ? templatesToTranslate : linksToTranslate;
128 - mapObject[oldValue] = newValue;
129 - }
 123+ // Replaces the passed old link/template with new link/template in
 124+ // templatesToTranslate or linksToTranslate collection
 125+ function replaceLinkOrTemplate(oldValue, newValue) {
 126+ var isTemplate = /^Template:/.test(oldValue),
 127+ mapObject = (isTemplate) ? templatesToTranslate : linksToTranslate;
 128+ mapObject[oldValue] = newValue;
 129+ }
130130
131 - // Callback when a page of interwiki links are queried and returned.
132 - function getInterWikiLinksCallback(data, titles) {
133 - if (!data || !data.query || !data.query.pages) {
134 - return; // no data to process
135 - }
 131+ // Callback when a page of interwiki links are queried and returned.
 132+ function getInterWikiLinksCallback(data, titles) {
 133+ if (!data || !data.query || !data.query.pages) {
 134+ return; // no data to process
 135+ }
136136
137 - var pages = data.query.pages;
 137+ var pages = data.query.pages;
138138
139 - for (var page in pages) {
140 - var langLinks = pages[page].langlinks;
141 - if (!langLinks) {
142 - continue;
143 - }
 139+ for (var page in pages) {
 140+ var langLinks = pages[page].langlinks;
 141+ if (!langLinks) {
 142+ continue;
 143+ }
144144
145 - var linkName = pages[page].title;
 145+ var linkName = pages[page].title;
146146
147 - for (var i in langLinks) {
148 - if (langLinks[i].lang === targetLanguage) {
149 - var targetLinkName = decodeURIComponent(langLinks[i]["*"]);
150 - replaceLinkOrTemplate(linkName, targetLinkName);
151 - }
152 - }
153 - }
 147+ for (var i in langLinks) {
 148+ if (langLinks[i].lang === targetLanguage) {
 149+ var targetLinkName = decodeURIComponent(langLinks[i]["*"]);
 150+ replaceLinkOrTemplate(linkName, targetLinkName);
 151+ }
 152+ }
 153+ }
154154
155 - // see if more data is there.
156 - if (data["query-continue"] && data["query-continue"].langlinks) {
157 - var llcontinue = data["query-continue"].langlinks.llcontinue;
158 - if (llcontinue) {
159 - wbWikiSite.getInterWikiLinks(titles, "llcontinue=" + llcontinue, getInterWikiLinksCallback);
160 - }
161 - }
 155+ // see if more data is there.
 156+ if (data["query-continue"] && data["query-continue"].langlinks) {
 157+ var llcontinue = data["query-continue"].langlinks.llcontinue;
 158+ if (llcontinue) {
 159+ wbWikiSite.getInterWikiLinks(titles, "llcontinue=" + llcontinue, getInterWikiLinksCallback);
 160+ }
 161+ }
162162
163 - replaceTemplateOrLinkInDomNode(contentDiv);
164 - }
 163+ replaceTemplateOrLinkInDomNode(contentDiv);
 164+ }
165165
166 - // Gets inner text of an element. Also normalizes <br> tags as new line chars.
167 - function getInnerText(elem) {
168 - var innerText = (elem.nodeType === textNodeType) ? elem.nodeValue : (elem.innerText || elem.textContent || "");
169 - innerText = innerText.replace(/<br\s*\/?>/gi, "\n");
170 - return innerText;
171 - }
 166+ // Gets inner text of an element. Also normalizes <br> tags as new line chars.
 167+ function getInnerText(elem) {
 168+ var innerText = (elem.nodeType === textNodeType) ? elem.nodeValue : (elem.innerText || elem.textContent || "");
 169+ innerText = innerText.replace(/<br\s*\/?>/gi, "\n");
 170+ return innerText;
 171+ }
172172
173 - // For given text containing complete template (including curley braces), returns
174 - // the translated template with translated parameters.
175 - function getTranslatedTemplate(templateData) {
176 - var data = templateData,
177 - match = data.match(/{{\s*([^\|\}\<]+)/);
178 - if (!match) {
179 - return null;
180 - }
 173+ // For given text containing complete template (including curley braces), returns
 174+ // the translated template with translated parameters.
 175+ function getTranslatedTemplate(templateData) {
 176+ var data = templateData,
 177+ match = data.match(/{{\s*([^\|\}\<]+)/);
 178+ if (!match) {
 179+ return null;
 180+ }
181181
182 - var srcTemplateName = match[1],
183 - tgtTemplateName = null;
184 - if (templatesToTranslate && templatesToTranslate[srcTemplateName]) {
185 - tgtTemplateName = templatesToTranslate[srcTemplateName];
186 - }
187 - else if (templateMapperHashMap) {
188 - var templateMapper = templateMapperHashMap[srcTemplateName];
189 - if (templateMapper) {
190 - tgtTemplateName = templateMapper[srcTemplateName];
191 - }
192 - }
 182+ var srcTemplateName = match[1],
 183+ tgtTemplateName = null;
 184+ if (templatesToTranslate && templatesToTranslate[srcTemplateName]) {
 185+ tgtTemplateName = templatesToTranslate[srcTemplateName];
 186+ }
 187+ else if (templateMapperHashMap) {
 188+ var templateMapper = templateMapperHashMap[srcTemplateName];
 189+ if (templateMapper) {
 190+ tgtTemplateName = templateMapper[srcTemplateName];
 191+ }
 192+ }
193193
194 - if (tgtTemplateName) {
195 - data = data.replace(match[0], "{{" + tgtTemplateName);
196 - data = replaceTemplateParameters(srcTemplateName, data);
197 - return data;
198 - }
199 - return null;
200 - }
 194+ if (tgtTemplateName) {
 195+ data = data.replace(match[0], "{{" + tgtTemplateName);
 196+ data = replaceTemplateParameters(srcTemplateName, data);
 197+ return data;
 198+ }
 199+ return null;
 200+ }
201201
202 - // replaces templates & links in DOM elements displayed in hybrid mode or wiki mode.
203 - function replaceTemplateOrLinkInDomNode(elem) {
204 - if ((templateMapperHashMap || templatesToTranslate) && elem.className === "wbHybridTemplate") {
205 - var data = wbUtil.getDataAttribute(elem),
206 - translatedTemplateData = getTranslatedTemplate(data);
207 - if (translatedTemplateData) {
208 - wbUtil.setDataAttribute(elem, translatedTemplateData);
209 - }
210 - }
211 - else if (linksToTranslate && elem.className === "wbHybridLinkRoot") {
212 - var data = wbUtil.getDataAttribute(elem);
213 - if (data) {
214 - var newLink = linksToTranslate[data];
215 - if (newLink) {
216 - wbUtil.setDataAttribute(elem, newLink);
217 - }
218 - }
219 - }
220 - else if ((templateMapperHashMap || templatesToTranslate) && elem.className === "wbWikiTemplate") {
221 - var data = elem.innerHTML,
222 - translatedTemplateData = getTranslatedTemplate(data);
223 - if (translatedTemplateData) {
224 - elem.innerHTML = translatedTemplateData;
225 - }
226 - }
227 - else if (linksToTranslate && elem.className === "wbWikiLinkTag") {
228 - var data = elem.innerHTML;
229 - if (data.length > 2 && data.charAt(0) === '[' && data.charAt(1) === '[') {
230 - var newLink = linksToTranslate[data.replace("[[", "").replace("|", "")];
231 - if (newLink) {
232 - elem.innerHTML = "[[" + newLink + "|";
233 - }
234 - }
235 - }
236 - else if (linksToTranslate && (elem.className === "wbWikiLinkText" || elem.className === "wbHybridLinkText")) {
237 - var data = elem.innerHTML,
238 - newLink = linksToTranslate[data];
239 - if (newLink) {
240 - elem.innerHTML = newLink;
241 - }
242 - }
 202+ // replaces templates & links in DOM elements displayed in hybrid mode or wiki mode.
 203+ function replaceTemplateOrLinkInDomNode(elem) {
 204+ if ((templateMapperHashMap || templatesToTranslate) && elem.className === "wbHybridTemplate") {
 205+ var data = wbUtil.getDataAttribute(elem),
 206+ translatedTemplateData = getTranslatedTemplate(data);
 207+ if (translatedTemplateData) {
 208+ wbUtil.setDataAttribute(elem, translatedTemplateData);
 209+ }
 210+ }
 211+ else if (linksToTranslate && elem.className === "wbHybridLinkRoot") {
 212+ var data = wbUtil.getDataAttribute(elem);
 213+ if (data) {
 214+ var newLink = linksToTranslate[data];
 215+ if (newLink) {
 216+ wbUtil.setDataAttribute(elem, newLink);
 217+ }
 218+ }
 219+ }
 220+ else if ((templateMapperHashMap || templatesToTranslate) && elem.className === "wbWikiTemplate") {
 221+ var data = elem.innerHTML,
 222+ translatedTemplateData = getTranslatedTemplate(data);
 223+ if (translatedTemplateData) {
 224+ elem.innerHTML = translatedTemplateData;
 225+ }
 226+ }
 227+ else if (linksToTranslate && elem.className === "wbWikiLinkTag") {
 228+ var data = elem.innerHTML;
 229+ if (data.length > 2 && data.charAt(0) === '[' && data.charAt(1) === '[') {
 230+ var newLink = linksToTranslate[data.replace("[[", "").replace("|", "")];
 231+ if (newLink) {
 232+ elem.innerHTML = "[[" + newLink + "|";
 233+ }
 234+ }
 235+ }
 236+ else if (linksToTranslate && (elem.className === "wbWikiLinkText" || elem.className === "wbHybridLinkText")) {
 237+ var data = elem.innerHTML,
 238+ newLink = linksToTranslate[data];
 239+ if (newLink) {
 240+ elem.innerHTML = newLink;
 241+ }
 242+ }
243243
244244
245 - if (elem.childNodes && elem.childNodes.length > 0) {
246 - $.each(elem.childNodes, function (i, node) {
247 - replaceTemplateOrLinkInDomNode(node);
248 - });
249 - }
250 - }
 245+ if (elem.childNodes && elem.childNodes.length > 0) {
 246+ $.each(elem.childNodes, function (i, node) {
 247+ replaceTemplateOrLinkInDomNode(node);
 248+ });
 249+ }
 250+ }
251251
252 - // dispatches the list of links & templates to wikisite API in multiple calls
253 - // as needed. Callback for each call will be called on successful completion of API.
254 - function dispatchLinksToApiForTranslation() {
255 - var linksData = getObjectPropertiesToArray(linksToTranslate),
256 - templatesData = getObjectPropertiesToArray(templatesToTranslate),
257 - linkItems = linksData.concat(templatesData),
258 - pageSize = wbWikiSite.wikiMaxTitlesPerInterWikiLinksApi,
259 - pagesArray = splitArrayIntoPages(linkItems, pageSize);
 252+ // dispatches the list of links & templates to wikisite API in multiple calls
 253+ // as needed. Callback for each call will be called on successful completion of API.
 254+ function dispatchLinksToApiForTranslation() {
 255+ var linksData = getObjectPropertiesToArray(linksToTranslate),
 256+ templatesData = getObjectPropertiesToArray(templatesToTranslate),
 257+ linkItems = linksData.concat(templatesData),
 258+ pageSize = wbWikiSite.wikiMaxTitlesPerInterWikiLinksApi,
 259+ pagesArray = splitArrayIntoPages(linkItems, pageSize);
260260
261 - for (var pageIndex = 0, len = pagesArray.length; pageIndex < len; pageIndex++) {
262 - var titlesArray = pagesArray[pageIndex],
263 - titlesString = titlesArray.join("|");
264 - wbWikiSite.getInterWikiLinks(titlesString, null, getInterWikiLinksCallback);
265 - }
266 - }
 261+ for (var pageIndex = 0, len = pagesArray.length; pageIndex < len; pageIndex++) {
 262+ var titlesArray = pagesArray[pageIndex],
 263+ titlesString = titlesArray.join("|");
 264+ wbWikiSite.getInterWikiLinks(titlesString, null, getInterWikiLinksCallback);
 265+ }
 266+ }
267267
268 - var templateMapperHashMap = null;
269 - function ensureGetTemplateMapperHashMap() {
270 - if (templateMapperHashMap) {
271 - return; // Already found the needed set, no need to find again.
272 - }
 268+ var templateMapperHashMap = null;
273269
274 - var xmlDoc,
275 - rootXmlText = wikiBhasha.configurations.templateMappers.templateMapConfig;
276 - if (!rootXmlText) {
277 - return;
278 - }
 270+ function ensureGetTemplateMapperHashMap() {
 271+ if (templateMapperHashMap) {
 272+ return; // Already found the needed set, no need to find again.
 273+ }
279274
280 - // load the xml configuration which specifies the template map
281 - if (window.DOMParser) {
282 - xmlDoc = (new DOMParser()).parseFromString(rootXmlText, "text/xml");
283 - }
284 - else // Internet Explorer
285 - {
286 - xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
287 - xmlDoc.async = "false";
288 - xmlDoc.loadXML(rootXmlText);
289 - }
 275+ var xmlDoc,
 276+ rootXmlText = wikiBhasha.configurations.templateMappers.templateMapConfig;
 277+ if (!rootXmlText) {
 278+ return;
 279+ }
290280
 281+ // load the xml configuration which specifies the template map
 282+ if (window.DOMParser) {
 283+ xmlDoc = (new DOMParser()).parseFromString(rootXmlText, "text/xml");
 284+ }
 285+ else // Internet Explorer
 286+ {
 287+ xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
 288+ xmlDoc.async = "false";
 289+ xmlDoc.loadXML(rootXmlText);
 290+ }
291291
292 - var templateMapBetweenLangPairs = [],
293 - currentTemplateMapBetweenLangPair;
294 - // get the map configuration portion or the given source and target language.
295 - templateMapBetweenLangPairs = xmlDoc.getElementsByTagName("templateMapBetweenLangPair");
296 - for (var i = 0; i < templateMapBetweenLangPairs.length; i++) {
297 - var oneTemplateMapBetweenLangPair = templateMapBetweenLangPairs[i];
298 - if (oneTemplateMapBetweenLangPair.attributes.getNamedItem("tgtLang").nodeValue === targetLanguage.toLowerCase()) {
299 - currentTemplateMapBetweenLangPair = oneTemplateMapBetweenLangPair;
300 - break;
301 - }
302 - }
303292
304 - if (currentTemplateMapBetweenLangPair) {
305 - // get the map configuration of all templates that are defined
306 - var mapperNodes = currentTemplateMapBetweenLangPair.getElementsByTagName("templateMap");
307 - // hash to store source template names as keys and the value of this is an object that specifies the map between the source and target language template pair
308 - templateMapperHashMap = {};
309 - for ( i = 0, len = mapperNodes.length; i < len; i++) {
310 - var currentMapperNode = mapperNodes[i];
311 - if (currentMapperNode) {
312 - // hash to store the map information of one source and target langauge template pair
313 - var mapPerTemplate = {},
314 - parameterNodes = [],
315 - // get the corresponding source and target language template names and store them in the hash
316 - srcTemplateName = currentMapperNode.attributes.getNamedItem("srcTemplateName").nodeValue;
317 - mapPerTemplate[srcTemplateName] = currentMapperNode.attributes.getNamedItem("tgtTemplateName").nodeValue;
318 - // get the parameter map information one at a time and store them also in the above hash.
319 - parameterNodes = currentMapperNode.getElementsByTagName("param");
320 - for (var iter = 0; iter < parameterNodes.length; iter++) {
321 - var srcTemplateParamName = parameterNodes[iter].attributes.getNamedItem("srcTemplateParamName").nodeValue,
322 - tgtTemplateParamName = parameterNodes[iter].attributes.getNamedItem("tgtTemplateParamName").nodeValue;
323 - mapPerTemplate[srcTemplateParamName] = tgtTemplateParamName;
324 - }
325 - templateMapperHashMap[srcTemplateName] = mapPerTemplate;
326 - }
327 - }
328 - }
329 - }
 293+ var templateMapBetweenLangPairs = [],
 294+ currentTemplateMapBetweenLangPair;
 295+ // get the map configuration portion or the given source and target language.
 296+ templateMapBetweenLangPairs = xmlDoc.getElementsByTagName("templateMapBetweenLangPair");
 297+ for (var i = 0; i < templateMapBetweenLangPairs.length; i++) {
 298+ var oneTemplateMapBetweenLangPair = templateMapBetweenLangPairs[i];
 299+ if (oneTemplateMapBetweenLangPair.attributes.getNamedItem("tgtLang").nodeValue === targetLanguage.toLowerCase()) {
 300+ currentTemplateMapBetweenLangPair = oneTemplateMapBetweenLangPair;
 301+ break;
 302+ }
 303+ }
330304
331 - function replaceParameterizedTemplates() {
332 - ensureGetTemplateMapperHashMap();
333 - replaceTemplateOrLinkInDomNode(contentDiv);
334 - }
 305+ if (currentTemplateMapBetweenLangPair) {
 306+ // get the map configuration of all templates that are defined
 307+ var mapperNodes = currentTemplateMapBetweenLangPair.getElementsByTagName("templateMap");
 308+ // hash to store source template names as keys and the value of this is an object that specifies the map between the source and target language template pair
 309+ templateMapperHashMap = {};
 310+ for (i = 0,len = mapperNodes.length; i < len; i++) {
 311+ var currentMapperNode = mapperNodes[i];
 312+ if (currentMapperNode) {
 313+ // hash to store the map information of one source and target langauge template pair
 314+ var mapPerTemplate = {},
 315+ parameterNodes = [],
 316+ // get the corresponding source and target language template names and store them in the hash
 317+ srcTemplateName = currentMapperNode.attributes.getNamedItem("srcTemplateName").nodeValue;
 318+ mapPerTemplate[srcTemplateName] = currentMapperNode.attributes.getNamedItem("tgtTemplateName").nodeValue;
 319+ // get the parameter map information one at a time and store them also in the above hash.
 320+ parameterNodes = currentMapperNode.getElementsByTagName("param");
 321+ for (var iter = 0; iter < parameterNodes.length; iter++) {
 322+ var srcTemplateParamName = parameterNodes[iter].attributes.getNamedItem("srcTemplateParamName").nodeValue,
 323+ tgtTemplateParamName = parameterNodes[iter].attributes.getNamedItem("tgtTemplateParamName").nodeValue;
 324+ mapPerTemplate[srcTemplateParamName] = tgtTemplateParamName;
 325+ }
 326+ templateMapperHashMap[srcTemplateName] = mapPerTemplate;
 327+ }
 328+ }
 329+ }
 330+ }
335331
336 - function replaceTemplateParameters(srcTemplateName, templateText) {
337 - if (!templateMapperHashMap) {
338 - return templateText;
339 - }
340 - var templateMapper = templateMapperHashMap[srcTemplateName];
 332+ function replaceParameterizedTemplates() {
 333+ ensureGetTemplateMapperHashMap();
 334+ replaceTemplateOrLinkInDomNode(contentDiv);
 335+ }
341336
342 - if (!templateMapper) {
343 - return templateText;
344 - }
 337+ function replaceTemplateParameters(srcTemplateName, templateText) {
 338+ if (!templateMapperHashMap) {
 339+ return templateText;
 340+ }
 341+ var templateMapper = templateMapperHashMap[srcTemplateName];
345342
346 - var regex = /\|\s*(.*?)\s*=/g,
347 - match;
348 - while (match = regex.exec(templateText)) {
349 - var param = match[1],
350 - paramText = match[0],
351 - paramMap = templateMapper[param];
352 - if (paramMap) {
353 - templateText = templateText.replace(paramText, "| " + paramMap + " =");
354 - }
355 - }
356 - return templateText;
357 - }
 343+ if (!templateMapper) {
 344+ return templateText;
 345+ }
358346
359 - function stringFormat(text) {
360 - var args = arguments;
361 - return text.replace(/\{(\d+)\}/g, function (a, b) {
362 - return args[parseInt(b) + 1];
363 - });
364 - }
 347+ var regex = /\|\s*(.*?)\s*=/g,
 348+ match;
 349+ while (match = regex.exec(templateText)) {
 350+ var param = match[1],
 351+ paramText = match[0],
 352+ paramMap = templateMapper[param];
 353+ if (paramMap) {
 354+ templateText = templateText.replace(paramText, "| " + paramMap + " =");
 355+ }
 356+ }
 357+ return templateText;
 358+ }
365359
366 -}
 360+ function stringFormat(text) {
 361+ var args = arguments;
 362+ return text.replace(/\{(\d+)\}/g, function (a, b) {
 363+ return args[parseInt(b) + 1];
 364+ });
 365+ }
367366
 367+};
368368
 369+
Index: trunk/extensions/WikiBhasha/src/js/core/chineaseLangSelection.js
@@ -27,63 +27,63 @@
2828 }
2929
3030 (function() {
31 - wikiBhasha.windowManagement.chineseLangSelectionBox = {
 31+ wikiBhasha.windowManagement.chineseLangSelectionBox = {
3232
33 - windowId : "wbChineseLangSelectionWindow",
34 -
35 - show : function() {
36 - var $chineseLangSelectionElement = $("#" + this.windowId);
37 -
38 - if ($chineseLangSelectionElement.length === 0) {
39 - wbUIHelper.createWindow(this.windowId, wbGlobalSettings.chineseLangSelectionHTML);
 33+ windowId : "wbChineseLangSelectionWindow",
4034
41 - //close the winow when user clicks on exit button
42 - $("#wbCLSExitWindow").click(function() {
43 - wbChineseLangSelection.hide();
44 - wbChineseLangSelection.deleteGlobalVariables();
45 - });
46 -
47 - //assigns the MTS language to zh-CHT
48 - $("#wbCHTLangButton").click(function() {
49 - wbGlobalSettings.mtTargetLanguageCode = 'zh-CHT';
50 - wikiBhasha.loadApplication();
51 - wbChineseLangSelection.hide();
52 - });
 35+ show : function() {
 36+ var $chineseLangSelectionElement = $("#" + this.windowId);
5337
54 - //assigns the MTS language to zh-CHS
55 - $("#wbCHSLangButton").click(function() {
56 - wbGlobalSettings.mtTargetLanguageCode = 'zh-CHS';
57 - wikiBhasha.loadApplication();
58 - wbChineseLangSelection.hide();
59 - });
60 - }
61 - $chineseLangSelectionElement.maxZIndex({ inc: 5 });
62 - },
63 - //removes the window from memory
64 - hide: function(){
65 - wbUIHelper.hideLightBox();
66 - wbUIHelper.removeWindow(wbChineseLangSelection.windowId);
67 - },
68 - //clean the objects from the memory
69 - deleteGlobalVariables: function() {
70 - var wbGlobalVariables =
71 - ["baseUrl",
72 - "s",
73 - "wbGlobalSettings",
74 - "wbChineseLangSelection",
75 - "wbLanguageServices",
76 - "wbLocal",
77 - "wbSplash",
78 - "wbUIHelper",
79 - "wbUtil",
80 - "wbWikiSite",
81 - "wbWorkflow"];
82 - for (var i = 0; i < wbGlobalVariables.length; i++) {
83 - window[wbGlobalVariables[i]] = undefined;
84 - }
85 - }
86 -}
 38+ if ($chineseLangSelectionElement.length === 0) {
 39+ wbUIHelper.createWindow(this.windowId, wbGlobalSettings.chineseLangSelectionHTML);
8740
 41+ //close the winow when user clicks on exit button
 42+ $("#wbCLSExitWindow").click(function() {
 43+ wbChineseLangSelection.hide();
 44+ wbChineseLangSelection.deleteGlobalVariables();
 45+ });
 46+
 47+ //assigns the MTS language to zh-CHT
 48+ $("#wbCHTLangButton").click(function() {
 49+ wbGlobalSettings.mtTargetLanguageCode = 'zh-CHT';
 50+ wikiBhasha.loadApplication();
 51+ wbChineseLangSelection.hide();
 52+ });
 53+
 54+ //assigns the MTS language to zh-CHS
 55+ $("#wbCHSLangButton").click(function() {
 56+ wbGlobalSettings.mtTargetLanguageCode = 'zh-CHS';
 57+ wikiBhasha.loadApplication();
 58+ wbChineseLangSelection.hide();
 59+ });
 60+ }
 61+ $chineseLangSelectionElement.maxZIndex({ inc: 5 });
 62+ },
 63+ //removes the window from memory
 64+ hide: function() {
 65+ wbUIHelper.hideLightBox();
 66+ wbUIHelper.removeWindow(wbChineseLangSelection.windowId);
 67+ },
 68+ //clean the objects from the memory
 69+ deleteGlobalVariables: function() {
 70+ var wbGlobalVariables =
 71+ ["baseUrl",
 72+ "s",
 73+ "wbGlobalSettings",
 74+ "wbChineseLangSelection",
 75+ "wbLanguageServices",
 76+ "wbLocal",
 77+ "wbSplash",
 78+ "wbUIHelper",
 79+ "wbUtil",
 80+ "wbWikiSite",
 81+ "wbWorkflow"];
 82+ for (var i = 0; i < wbGlobalVariables.length; i++) {
 83+ window[wbGlobalVariables[i]] = undefined;
 84+ }
 85+ }
 86+ };
 87+
8888 wbChineseLangSelection = wikiBhasha.windowManagement.chineseLangSelectionBox;
8989
9090 })();
\ No newline at end of file
Index: trunk/extensions/WikiBhasha/src/js/core/configurations.templateMappers.js
@@ -60,7 +60,7 @@
6161
6262 // describes the configuration required for template mapping from source language article to target language article.
6363 wikiBhasha.configurations.templateMappers = {
64 - templateMapConfig :'<?xml version="1.0"?>\
 64+ templateMapConfig :'<?xml version="1.0"?>\
6565 <templateMapConfig>\
6666 <templateMapBetweenLangPair srcLang="en" tgtLang="ja">\
6767 <templateMap srcTemplateName="EnTemplate1" tgtTemplateName="JaTempalte1">\
@@ -79,4 +79,4 @@
8080 </templateMap>\
8181 </templateMapBetweenLangPair>\
8282 </templateMapConfig>'
83 -}
 83+};

Follow-up revisions

RevisionCommit summaryAuthorDate
r78074Fixup spaces to tabs from r77932reedy16:45, 8 December 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r77872bug 26265, a few explicit ; at end of blocksreedy12:18, 6 December 2010
r77922(bug 26265) Many semicolons are missing from JavaScript files...reedy22:29, 6 December 2010
r77923(bug 26265) Many semicolons are missing from JavaScript files...reedy22:30, 6 December 2010
r77924(bug 26265) Many semicolons are missing from JavaScript files...reedy22:30, 6 December 2010
r77926(bug 26265) Many semicolons are missing from JavaScript files...reedy22:34, 6 December 2010
r77928Some more unterminated statements (bug 26265)reedy22:51, 6 December 2010

Comments

#Comment by Catrope (talk | contribs)   16:09, 8 December 2010

Unexplained mass whitespace changes that don't even clean stuff up in many cases (e.g. change 8 spaces to a tab and 4 spaces), please fix that.

Reviewed with svn di -x -w , non-whitespace changes look OK.

Status & tagging log