Merge "Make visualeditor-quick-access-characters.json always exist"

This commit is contained in:
jenkins-bot 2016-06-24 10:04:53 +00:00 committed by Gerrit Code Review
commit 4973740ae3
3 changed files with 10 additions and 7 deletions

View file

@ -307,6 +307,7 @@
"visualeditor-preference-tabs-prefer-ve": "Always give me the visual editor if possible",
"visualeditor-preference-tabs-prefer-wt": "Always give me the source editor",
"visualeditor-preference-tabs-remember-last": "Remember my last editor",
"visualeditor-quick-access-characters.json": "null",
"visualeditor-recreate": "The page has been deleted since you started editing. Press \"$1\" to recreate it.",
"visualeditor-redirect-description": "Redirect to $1",
"visualeditor-savedialog-error-badtoken": "We could not save your edit because the session was no longer valid.",

View file

@ -318,6 +318,7 @@
"visualeditor-preference-tabs-prefer-ve": "Used in [[Special:Preferences]].\n\nUsed as label for a radio button to have VisualEditor be the preferred editor. Shown together with the following buttons, so consider formulating them consistently:\n* {{msg-mw|Visualeditor-preference-tabs-multi-tab}}\n* {{msg-mw|Visualeditor-preference-tabs-prefer-wt}}\n* {{msg-mw|Visualeditor-preference-tabs-remember-last}}",
"visualeditor-preference-tabs-prefer-wt": "Used in [[Special:Preferences]].\n\nUsed as label for a radio button to have the wikitext editor be the preferred editor. Shown together with the following buttons, so consider formulating them consistently:\n* {{msg-mw|Visualeditor-preference-tabs-multi-tab}}\n* {{msg-mw|Visualeditor-preference-tabs-prefer-ve}}\n* {{msg-mw|Visualeditor-preference-tabs-remember-last}}",
"visualeditor-preference-tabs-remember-last": "Used in [[Special:Preferences]].\n\nUsed as label for a radio button to have VisualEditor remember whether it was the last editor or not. Shown together with the following buttons, so consider formulating them consistently:\n* {{msg-mw|Visualeditor-preference-tabs-multi-tab}}\n* {{msg-mw|Visualeditor-preference-tabs-prefer-ve}}\n* {{msg-mw|Visualeditor-preference-tabs-prefer-wt}}",
"visualeditor-quick-access-characters.json": "JSON object mapping character labels to actual characters that can be inserted using the special character inserter.",
"visualeditor-recreate": "Text shown when the editor fails to save the page due to it having been deleted since they opened VE. $1 is the message {{msg-mw|ooui-dialog-process-continue}}.",
"visualeditor-redirect-description": "Title shown as the description of redirect nodes.\n\nParameters:\n* $1 - Target title of redirect",
"visualeditor-savedialog-error-badtoken": "Error displayed in the save dialog if saving the edit failed due to an invalid edit token (likely due to the user having logged out in a separate window, or logged in again)",

View file

@ -186,15 +186,16 @@ ve.init.mw.Platform.prototype.fetchSpecialCharList = function () {
var characters = {},
otherGroupName = mw.msg( 'visualeditor-special-characters-group-other' ),
otherMsg = mw.msg( 'visualeditor-quick-access-characters.json' ),
groupObject;
other, groupObject;
if ( otherMsg !== '<visualeditor-quick-access-characters.json>' ) {
try {
characters[ otherGroupName ] = JSON.parse( otherMsg );
} catch ( err ) {
ve.log( 've.init.mw.Platform: Could not parse the Special Character list.' );
ve.log( err );
try {
other = JSON.parse( otherMsg );
if ( other ) {
characters[ otherGroupName ] = other;
}
} catch ( err ) {
ve.log( 've.init.mw.Platform: Could not parse the Special Character list.' );
ve.log( err );
}
$.each( mw.language.specialCharacters, function ( groupName, groupCharacters ) {