<?php
-function mce_put_file( $path, $content ) {
- if ( function_exists('file_put_contents') )
- return @file_put_contents( $path, $content );
-
- $newfile = false;
- $fp = @fopen( $path, 'wb' );
- if ($fp) {
- $newfile = fwrite( $fp, $content );
- fclose($fp);
- }
- return $newfile;
-}
-
-// escape text only if it needs translating
function mce_escape($text) {
- global $language;
-
- if ( 'en' == $language ) return $text;
- else return esc_js($text);
+ return esc_js($text);
}
-$lang = 'tinyMCE.addI18n({' . $language . ':{
+if ( ! class_exists( '_WP_Editors' ) )
+ require( ABSPATH . WPINC . '/class-wp-editor.php' );
+
+$lang = 'tinyMCE.addI18n({' . _WP_Editors::$mce_locale . ':{
common:{
edit_confirm:"' . mce_escape( __('Do you want to use the WYSIWYG mode for this textarea?') ) . '",
apply:"' . mce_escape( __('Apply') ) . '",
clipboard_msg:"' . mce_escape( __('Copy/Cut/Paste is not available in Mozilla and Firefox.') ) . '",
clipboard_no_support:"' . mce_escape( __('Currently not supported by your browser, use keyboard shortcuts instead.') ) . '",
popup_blocked:"' . mce_escape( __('Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.') ) . '",
-invalid_data:"' . mce_escape( __('Error: Invalid values entered, these are marked in red.') ) . '",
+invalid_data:"' . mce_escape( __('ERROR: Invalid values entered, these are marked in red.') ) . '",
+invalid_data_number:"' . mce_escape( __('{#field} must be a number') ) . '",
+invalid_data_min:"' . mce_escape( __('{#field} must be a number greater than {#min}') ) . '",
+invalid_data_size:"' . mce_escape( __('{#field} must be a number or percentage') ) . '",
more_colors:"' . mce_escape( __('More colors') ) . '"
},
+colors:{
+"000000":"' . mce_escape( __('Black') ) . '",
+"993300":"' . mce_escape( __('Burnt orange') ) . '",
+"333300":"' . mce_escape( __('Dark olive') ) . '",
+"003300":"' . mce_escape( __('Dark green') ) . '",
+"003366":"' . mce_escape( __('Dark azure') ) . '",
+"000080":"' . mce_escape( __('Navy Blue') ) . '",
+"333399":"' . mce_escape( __('Indigo') ) . '",
+"333333":"' . mce_escape( __('Very dark gray') ) . '",
+"800000":"' . mce_escape( __('Maroon') ) . '",
+"FF6600":"' . mce_escape( __('Orange') ) . '",
+"808000":"' . mce_escape( __('Olive') ) . '",
+"008000":"' . mce_escape( __('Green') ) . '",
+"008080":"' . mce_escape( __('Teal') ) . '",
+"0000FF":"' . mce_escape( __('Blue') ) . '",
+"666699":"' . mce_escape( __('Grayish blue') ) . '",
+"808080":"' . mce_escape( __('Gray') ) . '",
+"FF0000":"' . mce_escape( __('Red') ) . '",
+"FF9900":"' . mce_escape( __('Amber') ) . '",
+"99CC00":"' . mce_escape( __('Yellow green') ) . '",
+"339966":"' . mce_escape( __('Sea green') ) . '",
+"33CCCC":"' . mce_escape( __('Turquoise') ) . '",
+"3366FF":"' . mce_escape( __('Royal blue') ) . '",
+"800080":"' . mce_escape( __('Purple') ) . '",
+"999999":"' . mce_escape( __('Medium gray') ) . '",
+"FF00FF":"' . mce_escape( __('Magenta') ) . '",
+"FFCC00":"' . mce_escape( __('Gold') ) . '",
+"FFFF00":"' . mce_escape( __('Yellow') ) . '",
+"00FF00":"' . mce_escape( __('Lime') ) . '",
+"00FFFF":"' . mce_escape( __('Aqua') ) . '",
+"00CCFF":"' . mce_escape( __('Sky blue') ) . '",
+"993366":"' . mce_escape( __('Brown') ) . '",
+"C0C0C0":"' . mce_escape( __('Silver') ) . '",
+"FF99CC":"' . mce_escape( __('Pink') ) . '",
+"FFCC99":"' . mce_escape( __('Peach') ) . '",
+"FFFF99":"' . mce_escape( __('Light yellow') ) . '",
+"CCFFCC":"' . mce_escape( __('Pale green') ) . '",
+"CCFFFF":"' . mce_escape( __('Pale cyan') ) . '",
+"99CCFF":"' . mce_escape( __('Light sky blue') ) . '",
+"CC99FF":"' . mce_escape( __('Plum') ) . '",
+"FFFFFF":"' . mce_escape( __('White') ) . '"
+},
contextmenu:{
align:"' . mce_escape( /* translators: alignment */ __('Alignment') ) . '",
left:"' . mce_escape( /* translators: alignment */ __('Left') ) . '",
paste:{
paste_text_desc:"' . mce_escape( __('Paste as Plain Text') ) . '",
paste_word_desc:"' . mce_escape( __('Paste from Word') ) . '",
-selectall_desc:"' . mce_escape( __('Select All') ) . '"
+selectall_desc:"' . mce_escape( __('Select All') ) . '",
+plaintext_mode_sticky:"' . mce_escape( __('Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.') ) . '",
+plaintext_mode:"' . mce_escape( __('Paste is now in plain text mode. Click again to toggle back to regular paste mode.') ) . '"
},
paste_dlg:{
text_title:"' . mce_escape( __('Use CTRL+V on your keyboard to paste the text into the window.') ) . '",
unload_msg:"' . mce_escape( __('The changes you made will be lost if you navigate away from this page.') ) . '"
},
fullscreen:{
-desc:"' . mce_escape( __('Toggle fullscreen mode') ) . ' (Alt+Shift+G)"
+desc:"' . mce_escape( __('Toggle fullscreen mode (Alt + Shift + G)') ) . '"
},
media:{
desc:"' . mce_escape( __('Insert / edit embedded media') ) . '",
-delta_width:"' . /* translators: Extra width for the media popup in pixels */ mce_escape( _x('0', 'media popup width') ) . '",
-delta_height:"' . /* translators: Extra height for the media popup in pixels */ mce_escape( _x('0', 'media popup height') ) . '",
edit:"' . mce_escape( __('Edit embedded media') ) . '"
},
fullpage:{
desc:"' . mce_escape( __('Visual control characters on/off.') ) . '"
},
spellchecker:{
-desc:"' . mce_escape( __('Toggle spellchecker') ) . ' (Alt+Shift+N)",
+desc:"' . mce_escape( __('Toggle spellchecker (Alt + Shift + N)') ) . '",
menu:"' . mce_escape( __('Spellchecker settings') ) . '",
ignore_word:"' . mce_escape( __('Ignore word') ) . '",
ignore_words:"' . mce_escape( __('Ignore all') ) . '",
wait:"' . mce_escape( __('Please wait...') ) . '",
sug:"' . mce_escape( __('Suggestions') ) . '",
no_sug:"' . mce_escape( __('No suggestions') ) . '",
-no_mpell:"' . mce_escape( __('No misspellings found.') ) . '"
+no_mpell:"' . mce_escape( __('No misspellings found.') ) . '",
+learn_word:"' . mce_escape( __('Learn word') ) . '"
},
pagebreak:{
desc:"' . mce_escape( __('Insert Page Break') ) . '"
-}}});
+},
+advlist:{
+types:"' . mce_escape( __('Types') ) . '",
+def:"' . mce_escape( __('Default') ) . '",
+lower_alpha:"' . mce_escape( __('Lower alpha') ) . '",
+lower_greek:"' . mce_escape( __('Lower greek') ) . '",
+lower_roman:"' . mce_escape( __('Lower roman') ) . '",
+upper_alpha:"' . mce_escape( __('Upper alpha') ) . '",
+upper_roman:"' . mce_escape( __('Upper roman') ) . '",
+circle:"' . mce_escape( __('Circle') ) . '",
+disc:"' . mce_escape( __('Disc') ) . '",
+square:"' . mce_escape( __('Square') ) . '"
+},
+aria:{
+rich_text_area:"' . mce_escape( __('Rich Text Area') ) . '"
+},
+wordcount:{
+words:"' . mce_escape( __('Words:') ) . ' "
+}
+}});
-tinyMCE.addI18n("' . $language . '.advanced",{
+tinyMCE.addI18n("' . _WP_Editors::$mce_locale . '.advanced",{
style_select:"' . mce_escape( /* translators: TinyMCE font styles */ _x('Styles', 'TinyMCE font styles') ) . '",
font_size:"' . mce_escape( __('Font size') ) . '",
fontdefault:"' . mce_escape( __('Font family') ) . '",
samp:"' . mce_escape( __('Code sample') ) . '",
dt:"' . mce_escape( __('Definition term ') ) . '",
dd:"' . mce_escape( __('Definition description') ) . '",
-bold_desc:"' . mce_escape( __('Bold') ) . ' (Ctrl / Alt+Shift + B)",
-italic_desc:"' . mce_escape( __('Italic') ) . ' (Ctrl / Alt+Shift + I)",
+bold_desc:"' . mce_escape( __('Bold (Ctrl + B)') ) . '",
+italic_desc:"' . mce_escape( __('Italic (Ctrl + I)') ) . '",
underline_desc:"' . mce_escape( __('Underline') ) . '",
-striketrough_desc:"' . mce_escape( __('Strikethrough') ) . ' (Alt+Shift+D)",
-justifyleft_desc:"' . mce_escape( __('Align Left') ) . ' (Alt+Shift+L)",
-justifycenter_desc:"' . mce_escape( __('Align Center') ) . ' (Alt+Shift+C)",
-justifyright_desc:"' . mce_escape( __('Align Right') ) . ' (Alt+Shift+R)",
-justifyfull_desc:"' . mce_escape( __('Align Full') ) . ' (Alt+Shift+J)",
-bullist_desc:"' . mce_escape( __('Unordered list') ) . ' (Alt+Shift+U)",
-numlist_desc:"' . mce_escape( __('Ordered list') ) . ' (Alt+Shift+O)",
+striketrough_desc:"' . mce_escape( __('Strikethrough (Alt + Shift + D)') ) . '",
+justifyleft_desc:"' . mce_escape( __('Align Left (Alt + Shift + L)') ) . '",
+justifycenter_desc:"' . mce_escape( __('Align Center (Alt + Shift + C)') ) . '",
+justifyright_desc:"' . mce_escape( __('Align Right (Alt + Shift + R)') ) . '",
+justifyfull_desc:"' . mce_escape( __('Align Full (Alt + Shift + J)') ) . '",
+bullist_desc:"' . mce_escape( __('Unordered list (Alt + Shift + U)') ) . '",
+numlist_desc:"' . mce_escape( __('Ordered list (Alt + Shift + O)') ) . '",
outdent_desc:"' . mce_escape( __('Outdent') ) . '",
indent_desc:"' . mce_escape( __('Indent') ) . '",
-undo_desc:"' . mce_escape( __('Undo') ) . ' (Ctrl+Z)",
-redo_desc:"' . mce_escape( __('Redo') ) . ' (Ctrl+Y)",
-link_desc:"' . mce_escape( __('Insert/edit link') ) . ' (Alt+Shift+A)",
-link_delta_width:"' . /* translators: Extra width for the link popup in pixels */ mce_escape( _x('0', 'link popup width') ) . '",
-link_delta_height:"' . /* translators: Extra height for the link popup in pixels */ mce_escape( _x('0', 'link popup height') ) . '",
-unlink_desc:"' . mce_escape( __('Unlink') ) . ' (Alt+Shift+S)",
-image_desc:"' . mce_escape( __('Insert/edit image') ) . ' (Alt+Shift+M)",
-image_delta_width:"' . /* translators: Extra width for the image popup in pixels */ mce_escape( _x('0', 'image popup width') ) . '",
-image_delta_height:"' . /* translators: Extra height for the image popup in pixels */ mce_escape( _x('0', 'image popup height') ) . '",
+undo_desc:"' . mce_escape( __('Undo (Ctrl + Z)') ) . '",
+redo_desc:"' . mce_escape( __('Redo (Ctrl + Y)') ) . '",
+link_desc:"' . mce_escape( __('Insert/edit link (Alt + Shift + A)') ) . '",
+unlink_desc:"' . mce_escape( __('Unlink (Alt + Shift + S)') ) . '",
+image_desc:"' . mce_escape( __('Insert/edit image (Alt + Shift + M)') ) . '",
cleanup_desc:"' . mce_escape( __('Cleanup messy code') ) . '",
code_desc:"' . mce_escape( __('Edit HTML Source') ) . '",
sub_desc:"' . mce_escape( __('Subscript') ) . '",
image_props_desc:"' . mce_escape( __('Image properties') ) . '",
newdocument_desc:"' . mce_escape( __('New document') ) . '",
help_desc:"' . mce_escape( __('Help') ) . '",
-blockquote_desc:"' . mce_escape( __('Blockquote') ) . ' (Alt+Shift+Q)",
+blockquote_desc:"' . mce_escape( __('Blockquote (Alt + Shift + Q)') ) . '",
clipboard_msg:"' . mce_escape( __('Copy/Cut/Paste is not available in Mozilla and Firefox.') ) . '",
path:"' . mce_escape( __('Path') ) . '",
newdocument:"' . mce_escape( __('Are you sure you want to clear all contents?') ) . '",
toolbar_focus:"' . mce_escape( __('Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X') ) . '",
more_colors:"' . mce_escape( __('More colors') ) . '",
-colorpicker_delta_width:"' . /* translators: Extra width for the colorpicker popup in pixels */ mce_escape( _x('0', 'colorpicker popup width') ) . '",
-colorpicker_delta_height:"' . /* translators: Extra height for the colorpicker popup in pixels */ mce_escape( _x('0', 'colorpicker popup height') ) . '"
+shortcuts_desc:"' . mce_escape( __('Accessibility Help') ) . '",
+help_shortcut:" ' . mce_escape( __('Press ALT F10 for toolbar. Press ALT 0 for help.') ) . '",
+rich_text_area:"' . mce_escape( __('Rich Text Area') ) . '",
+toolbar:"' . mce_escape( __('Toolbar') ) . '"
});
-tinyMCE.addI18n("' . $language . '.advanced_dlg",{
+tinyMCE.addI18n("' . _WP_Editors::$mce_locale . '.advanced_dlg",{
about_title:"' . mce_escape( __('About TinyMCE') ) . '",
about_general:"' . mce_escape( __('About') ) . '",
about_help:"' . mce_escape( __('Help') ) . '",
colorpicker_named_tab:"' . mce_escape( __('Named') ) . '",
colorpicker_named_title:"' . mce_escape( __('Named colors') ) . '",
colorpicker_color:"' . mce_escape( __('Color:') ) . '",
-colorpicker_name:"' . mce_escape( __('Name:') ) . '",
+colorpicker_name:"' . mce_escape( _x('Name:', 'html attribute') ) . '",
charmap_title:"' . mce_escape( __('Select custom character') ) . '",
image_title:"' . mce_escape( __('Insert/edit image') ) . '",
image_src:"' . mce_escape( __('Image URL') ) . '",
link_titlefield:"' . mce_escape( __('Title') ) . '",
link_is_email:"' . mce_escape( __('The URL you entered seems to be an email address, do you want to add the required mailto: prefix?') ) . '",
link_is_external:"' . mce_escape( __('The URL you entered seems to external link, do you want to add the required http:// prefix?') ) . '",
-link_list:"' . mce_escape( __('Link list') ) . '"
+link_list:"' . mce_escape( __('Link list') ) . '",
+accessibility_help:"' . mce_escape( __('Accessibility Help') ) . '",
+accessibility_usage_title:"' . mce_escape( __('General Usage') ) . '"
});
-tinyMCE.addI18n("' . $language . '.media_dlg",{
+tinyMCE.addI18n("' . _WP_Editors::$mce_locale . '.media_dlg",{
title:"' . mce_escape( __('Insert / edit embedded media') ) . '",
general:"' . mce_escape( __('General') ) . '",
advanced:"' . mce_escape( __('Advanced') ) . '",
constrain_proportions:"' . mce_escape( __('Constrain proportions') ) . '",
type:"' . mce_escape( __('Type') ) . '",
id:"' . mce_escape( __('Id') ) . '",
-name:"' . mce_escape( __('Name') ) . '",
+name:"' . mce_escape( _x('Name', 'html attribute') ) . '",
class_name:"' . mce_escape( __('Class') ) . '",
vspace:"' . mce_escape( __('V-Space') ) . '",
hspace:"' . mce_escape( __('H-Space') ) . '",
flv_loop:"' . mce_escape( __('Loop') ) . '",
flv_showscalemodes:"' . mce_escape( __('Show scale modes') ) . '",
flv_smoothvideo:"' . mce_escape( __('Smooth video') ) . '",
-flv_jscallback:"' . mce_escape( __('JS Callback') ) . '"
+flv_jscallback:"' . mce_escape( __('JS Callback') ) . '",
+html5_video_options:"' . mce_escape( __('HTML5 Video Options') ) . '",
+altsource1:"' . mce_escape( __('Alternative source 1') ) . '",
+altsource2:"' . mce_escape( __('Alternative source 2') ) . '",
+preload:"' . mce_escape( __('Preload') ) . '",
+poster:"' . mce_escape( __('Poster') ) . '",
+source:"' . mce_escape( __('Source') ) . '"
});
-tinyMCE.addI18n("' . $language . '.wordpress",{
-wp_adv_desc:"' . mce_escape( __('Show/Hide Kitchen Sink') ) . ' (Alt+Shift+Z)",
-wp_more_desc:"' . mce_escape( __('Insert More Tag') ) . ' (Alt+Shift+T)",
-wp_page_desc:"' . mce_escape( __('Insert Page break') ) . ' (Alt+Shift+P)",
-wp_help_desc:"' . mce_escape( __('Help') ) . ' (Alt+Shift+H)",
+tinyMCE.addI18n("' . _WP_Editors::$mce_locale . '.wordpress",{
+wp_adv_desc:"' . mce_escape( __('Show/Hide Kitchen Sink (Alt + Shift + Z)') ) . '",
+wp_more_desc:"' . mce_escape( __('Insert More Tag (Alt + Shift + T)') ) . '",
+wp_page_desc:"' . mce_escape( __('Insert Page break (Alt + Shift + P)') ) . '",
+wp_help_desc:"' . mce_escape( __('Help (Alt + Shift + H)') ) . '",
wp_more_alt:"' . mce_escape( __('More...') ) . '",
wp_page_alt:"' . mce_escape( __('Next page...') ) . '",
add_media:"' . mce_escape( __('Add Media') ) . '",
delgallery:"' . mce_escape( __('Delete Gallery') ) . '"
});
-tinyMCE.addI18n("' . $language . '.wpeditimage",{
+tinyMCE.addI18n("' . _WP_Editors::$mce_locale . '.wpeditimage",{
edit_img:"' . mce_escape( __('Edit Image') ) . '",
del_img:"' . mce_escape( __('Delete Image') ) . '",
adv_settings:"' . mce_escape( __('Advanced Settings') ) . '",