Index: trunk/extensions/WikiBhasha/src/lang/en/strings.js |
— | — | @@ -23,95 +23,95 @@ |
24 | 24 | |
25 | 25 | wikiBhasha.localStrings = { |
26 | 26 | |
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...", |
87 | 87 | |
88 | | - //tooptip strings |
89 | | - searchInputTooltip: "Search", |
90 | | - collapseTooltip: "Collapse", |
91 | | - expandPaneTooltip: "Expand", |
| 88 | + //tooptip strings |
| 89 | + searchInputTooltip: "Search", |
| 90 | + collapseTooltip: "Collapse", |
| 91 | + expandPaneTooltip: "Expand", |
92 | 92 | |
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 | + }; |
116 | 116 | |
117 | 117 | //short cut to call local strings |
118 | 118 | wbLocal = wikiBhasha.localStrings; |
Index: trunk/extensions/WikiBhasha/src/lang/fr/strings.js |
— | — | @@ -23,93 +23,93 @@ |
24 | 24 | |
25 | 25 | wikiBhasha.localStrings = { |
26 | 26 | |
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 ?", |
85 | 85 | |
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", |
90 | 90 | |
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 | + }; |
114 | 114 | |
115 | 115 | //short cut to call local strings |
116 | 116 | wbLocal = wikiBhasha.localStrings; |
Index: trunk/extensions/WikiBhasha/src/lang/de/strings.js |
— | — | @@ -22,95 +22,95 @@ |
23 | 23 | |
24 | 24 | wikiBhasha.localStrings = { |
25 | 25 | |
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...", |
86 | 86 | |
87 | | - //tooptip strings |
88 | | - searchInputTooltip: "Search", |
89 | | - collapseTooltip: "Collapse", |
90 | | - expandPaneTooltip: "Expand", |
| 87 | + //tooptip strings |
| 88 | + searchInputTooltip: "Search", |
| 89 | + collapseTooltip: "Collapse", |
| 90 | + expandPaneTooltip: "Expand", |
91 | 91 | |
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 | + }; |
115 | 115 | |
116 | 116 | //short cut to call local strings |
117 | 117 | wbLocal = wikiBhasha.localStrings; |
Index: trunk/extensions/WikiBhasha/src/js/main.js |
— | — | @@ -335,7 +335,7 @@ |
336 | 336 | // NOTE: Never use any jQuery functions within this function. |
337 | 337 | wikiBhasha.loadJQuery = function(callback) { |
338 | 338 | if (typeof baseUrl != "undefined") { |
339 | | - var script = document.createElement("script") |
| 339 | + var script = document.createElement("script"); |
340 | 340 | script.type = "text/javascript"; |
341 | 341 | //check whether file is loaded or not if so, call the the 'callback' function |
342 | 342 | //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 @@ |
7 | 7 | */ |
8 | 8 | jQuery.shortcut = { |
9 | 9 | 'all_shortcuts':{},//All the shortcuts are stored in this array |
10 | | - 'add': function(shortcut_combination,callback,opt) { |
| 10 | + 'add': function(shortcut_combination, callback, opt) { |
11 | 11 | //Provide a set of default options |
12 | 12 | var default_options = { |
13 | 13 | 'type':'keydown', |
— | — | @@ -14,44 +14,44 @@ |
15 | 15 | 'disable_in_input':false, |
16 | 16 | 'target':document, |
17 | 17 | 'keycode':false |
18 | | - } |
19 | | - if(!opt) opt = default_options; |
| 18 | + }; |
| 19 | + if (!opt) opt = default_options; |
20 | 20 | 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]; |
23 | 23 | } |
24 | 24 | } |
25 | 25 | |
26 | 26 | 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); |
28 | 28 | var ths = this; |
29 | 29 | shortcut_combination = shortcut_combination.toLowerCase(); |
30 | 30 | |
31 | 31 | //The function to be called at keypress |
32 | 32 | var func = function(e) { |
33 | 33 | 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 |
36 | 36 | 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; |
40 | 40 | |
41 | | - if(element.tagName == 'INPUT' || element.tagName == 'TEXTAREA') return; |
| 41 | + if (element.tagName == 'INPUT' || element.tagName == 'TEXTAREA') return; |
42 | 42 | } |
43 | | - |
| 43 | + |
44 | 44 | //Find Which key is pressed |
45 | 45 | if (e.keyCode) code = e.keyCode; |
46 | 46 | else if (e.which) code = e.which; |
47 | 47 | 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 |
51 | 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 |
| 51 | + |
52 | 52 | var keys = shortcut_combination.split("+"); |
53 | 53 | //Key Pressed - counts the number of valid keypresses - if it is same as the number of keys, the shortcut function is invoked |
54 | 54 | var kp = 0; |
55 | | - |
| 55 | + |
56 | 56 | //Work around for stupid Shift key bug created by using lowercase - as a result the shift+num combination was broken |
57 | 57 | var shift_nums = { |
58 | 58 | "`":"~", |
— | — | @@ -73,7 +73,7 @@ |
74 | 74 | ".":">", |
75 | 75 | "/":"?", |
76 | 76 | "\\":"|" |
77 | | - } |
| 77 | + }; |
78 | 78 | //Special Keys - and their codes |
79 | 79 | var special_keys = { |
80 | 80 | 'esc':27, |
— | — | @@ -83,7 +83,7 @@ |
84 | 84 | 'return':13, |
85 | 85 | 'enter':13, |
86 | 86 | 'backspace':8, |
87 | | - |
| 87 | + |
88 | 88 | 'scrolllock':145, |
89 | 89 | 'scroll_lock':145, |
90 | 90 | 'scroll':145, |
— | — | @@ -93,28 +93,28 @@ |
94 | 94 | 'numlock':144, |
95 | 95 | 'num_lock':144, |
96 | 96 | 'num':144, |
97 | | - |
| 97 | + |
98 | 98 | 'pause':19, |
99 | 99 | 'break':19, |
100 | | - |
| 100 | + |
101 | 101 | 'insert':45, |
102 | 102 | 'home':36, |
103 | 103 | 'delete':46, |
104 | 104 | 'end':35, |
105 | | - |
| 105 | + |
106 | 106 | 'pageup':33, |
107 | 107 | 'page_up':33, |
108 | 108 | 'pu':33, |
109 | | - |
| 109 | + |
110 | 110 | 'pagedown':34, |
111 | 111 | 'page_down':34, |
112 | 112 | 'pd':34, |
113 | | - |
| 113 | + |
114 | 114 | 'left':37, |
115 | 115 | 'up':38, |
116 | 116 | 'right':39, |
117 | 117 | 'down':40, |
118 | | - |
| 118 | + |
119 | 119 | 'f1':112, |
120 | 120 | 'f2':113, |
121 | 121 | 'f3':114, |
— | — | @@ -127,65 +127,65 @@ |
128 | 128 | 'f10':121, |
129 | 129 | 'f11':122, |
130 | 130 | 'f12':123 |
131 | | - } |
132 | | - |
133 | | - var modifiers = { |
| 131 | + }; |
| 132 | + |
| 133 | + var modifiers = { |
134 | 134 | shift: { wanted:false, pressed:false}, |
135 | 135 | ctrl : { wanted:false, pressed:false}, |
136 | 136 | alt : { wanted:false, pressed:false}, |
137 | 137 | meta : { wanted:false, pressed:false} //Meta is Mac specific |
138 | 138 | }; |
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++) { |
146 | 146 | //Modifiers |
147 | | - if(k == 'ctrl' || k == 'control') { |
| 147 | + if (k == 'ctrl' || k == 'control') { |
148 | 148 | kp++; |
149 | 149 | modifiers.ctrl.wanted = true; |
150 | 150 | |
151 | | - } else if(k == 'shift') { |
| 151 | + } else if (k == 'shift') { |
152 | 152 | kp++; |
153 | 153 | modifiers.shift.wanted = true; |
154 | 154 | |
155 | | - } else if(k == 'alt') { |
| 155 | + } else if (k == 'alt') { |
156 | 156 | kp++; |
157 | 157 | modifiers.alt.wanted = true; |
158 | | - } else if(k == 'meta') { |
| 158 | + } else if (k == 'meta') { |
159 | 159 | kp++; |
160 | 160 | 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++; |
166 | 163 | |
| 164 | + } else if (opt['keycode']) { |
| 165 | + if (opt['keycode'] == code) kp++; |
| 166 | + |
167 | 167 | } else { //The special keys did not match |
168 | | - if(character == k) kp++; |
| 168 | + if (character == k) kp++; |
169 | 169 | 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++; |
173 | 173 | } |
174 | 174 | } |
175 | 175 | } |
176 | 176 | } |
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) { |
183 | 183 | callback(e); |
184 | | - |
185 | | - if(!opt['propagate']) { //Stop the event |
| 184 | + |
| 185 | + if (!opt['propagate']) { //Stop the event |
186 | 186 | //e.cancelBubble is supported by IE - this will kill the bubbling process. |
187 | 187 | e.cancelBubble = true; |
188 | 188 | e.returnValue = false; |
189 | | - |
| 189 | + |
190 | 190 | //e.stopPropagation works in Firefox. |
191 | 191 | if (e.stopPropagation) { |
192 | 192 | e.stopPropagation(); |
— | — | @@ -194,30 +194,30 @@ |
195 | 195 | return false; |
196 | 196 | } |
197 | 197 | } |
198 | | - } |
| 198 | + }; |
199 | 199 | this.all_shortcuts[shortcut_combination] = { |
200 | | - 'callback':func, |
201 | | - 'target':ele, |
| 200 | + 'callback':func, |
| 201 | + 'target':ele, |
202 | 202 | 'event': opt['type'] |
203 | 203 | }; |
204 | 204 | //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; |
208 | 208 | }, |
209 | 209 | |
210 | 210 | //Remove the shortcut - just specify the shortcut and I will remove the binding |
211 | 211 | 'remove':function(shortcut_combination) { |
212 | 212 | shortcut_combination = shortcut_combination.toLowerCase(); |
213 | 213 | 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; |
216 | 216 | var type = binding['event']; |
217 | 217 | var ele = binding['target']; |
218 | 218 | var callback = binding['callback']; |
219 | 219 | |
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; |
223 | 223 | } |
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 @@ |
133 | 133 | this.getArticlePageId(sourceLanguage, sourceLanguageArticleTitle, function(pageID) { |
134 | 134 | if (pageID) { |
135 | 135 | $.getJSON(urlData, 'callback=?', function(data) { |
136 | | - var langLinkList = data.query.pages[pageID].langlinks |
| 136 | + var langLinkList = data.query.pages[pageID].langlinks; |
137 | 137 | if (langLinkList) { |
138 | 138 | for (i = 0; i < langLinkList.length; i++) { |
139 | 139 | if (targetLanguage === langLinkList[i].lang) { |
Index: trunk/extensions/WikiBhasha/src/js/core/styleBackgroundImages.js |
— | — | @@ -25,233 +25,233 @@ |
26 | 26 | (function () { |
27 | 27 | //includes all the methods and properties to manipulate themes of the application |
28 | 28 | 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 | + }, |
117 | 117 | |
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 | + }, |
172 | 172 | |
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 | + }, |
227 | 227 | |
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 | + }, |
236 | 236 | |
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 | + }; |
256 | 256 | |
257 | 257 | //shortcut to call wikiBhasha.applyBackground |
258 | 258 | wbImageRef = wikiBhasha.applyBackground; |
Index: trunk/extensions/WikiBhasha/src/js/core/templateAndLinkTranslator.js |
— | — | @@ -40,328 +40,329 @@ |
41 | 41 | |
42 | 42 | wikiBhasha.contentManagement.templatesAndLinksTranslator = function (contentDiv, targetLanguage, wikiText) { |
43 | 43 | |
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 | + }; |
50 | 50 | |
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 | + }; |
57 | 57 | |
58 | | - // Private members |
59 | | - var templatesToTranslate = null, |
60 | | - linksToTranslate = null; |
| 58 | + // Private members |
| 59 | + var templatesToTranslate = null, |
| 60 | + linksToTranslate = null; |
61 | 61 | |
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 | + } |
77 | 77 | |
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 = {}; |
85 | 85 | |
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 | + } |
93 | 93 | |
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 | + } |
102 | 102 | |
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 | + } |
122 | 122 | |
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 | + } |
130 | 130 | |
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 | + } |
136 | 136 | |
137 | | - var pages = data.query.pages; |
| 137 | + var pages = data.query.pages; |
138 | 138 | |
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 | + } |
144 | 144 | |
145 | | - var linkName = pages[page].title; |
| 145 | + var linkName = pages[page].title; |
146 | 146 | |
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 | + } |
154 | 154 | |
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 | + } |
162 | 162 | |
163 | | - replaceTemplateOrLinkInDomNode(contentDiv); |
164 | | - } |
| 163 | + replaceTemplateOrLinkInDomNode(contentDiv); |
| 164 | + } |
165 | 165 | |
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 | + } |
172 | 172 | |
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 | + } |
181 | 181 | |
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 | + } |
193 | 193 | |
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 | + } |
201 | 201 | |
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 | + } |
243 | 243 | |
244 | 244 | |
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 | + } |
251 | 251 | |
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); |
260 | 260 | |
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 | + } |
267 | 267 | |
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; |
273 | 269 | |
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 | + } |
279 | 274 | |
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 | + } |
290 | 280 | |
| 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 | + } |
291 | 291 | |
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 | | - } |
303 | 292 | |
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 | + } |
330 | 304 | |
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 | + } |
335 | 331 | |
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 | + } |
341 | 336 | |
342 | | - if (!templateMapper) { |
343 | | - return templateText; |
344 | | - } |
| 337 | + function replaceTemplateParameters(srcTemplateName, templateText) { |
| 338 | + if (!templateMapperHashMap) { |
| 339 | + return templateText; |
| 340 | + } |
| 341 | + var templateMapper = templateMapperHashMap[srcTemplateName]; |
345 | 342 | |
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 | + } |
358 | 346 | |
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 | + } |
365 | 359 | |
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 | + } |
367 | 366 | |
| 367 | +}; |
368 | 368 | |
| 369 | + |
Index: trunk/extensions/WikiBhasha/src/js/core/chineaseLangSelection.js |
— | — | @@ -27,63 +27,63 @@ |
28 | 28 | } |
29 | 29 | |
30 | 30 | (function() { |
31 | | - wikiBhasha.windowManagement.chineseLangSelectionBox = { |
| 31 | + wikiBhasha.windowManagement.chineseLangSelectionBox = { |
32 | 32 | |
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", |
40 | 34 | |
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); |
53 | 37 | |
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); |
87 | 40 | |
| 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 | + |
88 | 88 | wbChineseLangSelection = wikiBhasha.windowManagement.chineseLangSelectionBox; |
89 | 89 | |
90 | 90 | })(); |
\ No newline at end of file |
Index: trunk/extensions/WikiBhasha/src/js/core/configurations.templateMappers.js |
— | — | @@ -60,7 +60,7 @@ |
61 | 61 | |
62 | 62 | // describes the configuration required for template mapping from source language article to target language article. |
63 | 63 | wikiBhasha.configurations.templateMappers = { |
64 | | - templateMapConfig :'<?xml version="1.0"?>\ |
| 64 | + templateMapConfig :'<?xml version="1.0"?>\ |
65 | 65 | <templateMapConfig>\ |
66 | 66 | <templateMapBetweenLangPair srcLang="en" tgtLang="ja">\ |
67 | 67 | <templateMap srcTemplateName="EnTemplate1" tgtTemplateName="JaTempalte1">\ |
— | — | @@ -79,4 +79,4 @@ |
80 | 80 | </templateMap>\ |
81 | 81 | </templateMapBetweenLangPair>\ |
82 | 82 | </templateMapConfig>' |
83 | | -} |
| 83 | +}; |