gettext for tinymce strings. Props azaozz. see #5769

git-svn-id: http://svn.automattic.com/wordpress/trunk@6765 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-02-09 06:43:15 +00:00
parent 9e6593de20
commit c25dd9912a
11 changed files with 447 additions and 493 deletions

View File

@ -1,154 +0,0 @@
tinyMCE.addI18n({en:{
common:{
edit_confirm:"Do you want to use the WYSIWYG mode for this textarea?",
apply:"Apply",
insert:"Insert",
update:"Update",
cancel:"Cancel",
close:"Close",
browse:"Browse",
class_name:"Class",
not_set:"-- Not set --",
clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?",
clipboard_no_support:"Currently not supported by your browser, use keyboard shortcuts instead.",
popup_blocked:"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:"Error: Invalid values entered, these are marked in red.",
more_colors:"More colors"
},
contextmenu:{
align:"Alignment",
left:"Left",
center:"Center",
right:"Right",
full:"Full"
},
insertdatetime:{
date_fmt:"%Y-%m-%d",
time_fmt:"%H:%M:%S",
insertdate_desc:"Insert date",
inserttime_desc:"Insert time",
months_long:"January,February,March,April,May,June,July,August,September,October,November,December",
months_short:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec",
day_long:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday",
day_short:"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun"
},
print:{
print_desc:"Print"
},
preview:{
preview_desc:"Preview"
},
directionality:{
ltr_desc:"Direction left to right",
rtl_desc:"Direction right to left"
},
layer:{
insertlayer_desc:"Insert new layer",
forward_desc:"Move forward",
backward_desc:"Move backward",
absolute_desc:"Toggle absolute positioning",
content:"New layer..."
},
save:{
save_desc:"Save",
cancel_desc:"Cancel all changes"
},
nonbreaking:{
nonbreaking_desc:"Insert non-breaking space character"
},
iespell:{
iespell_desc:"Run spell checking",
download:"ieSpell not detected. Do you want to install it now?"
},
advhr:{
advhr_desc:"Horizontale rule"
},
emotions:{
emotions_desc:"Emotions"
},
searchreplace:{
search_desc:"Find",
replace_desc:"Find/Replace"
},
advimage:{
image_desc:"Insert/edit image"
},
advlink:{
link_desc:"Insert/edit link"
},
xhtmlxtras:{
cite_desc:"Citation",
abbr_desc:"Abbreviation",
acronym_desc:"Acronym",
del_desc:"Deletion",
ins_desc:"Insertion",
attribs_desc:"Insert/Edit Attributes"
},
style:{
desc:"Edit CSS Style"
},
paste:{
paste_text_desc:"Paste as Plain Text",
paste_word_desc:"Paste from Word",
selectall_desc:"Select All"
},
paste_dlg:{
text_title:"Use CTRL+V on your keyboard to paste the text into the window.",
text_linebreaks:"Keep linebreaks",
word_title:"Use CTRL+V on your keyboard to paste the text into the window."
},
table:{
desc:"Inserts a new table",
row_before_desc:"Insert row before",
row_after_desc:"Insert row after",
delete_row_desc:"Delete row",
col_before_desc:"Insert column before",
col_after_desc:"Insert column after",
delete_col_desc:"Remove column",
split_cells_desc:"Split merged table cells",
merge_cells_desc:"Merge table cells",
row_desc:"Table row properties",
cell_desc:"Table cell properties",
props_desc:"Table properties",
paste_row_before_desc:"Paste table row before",
paste_row_after_desc:"Paste table row after",
cut_row_desc:"Cut table row",
copy_row_desc:"Copy table row",
del:"Delete table",
row:"Row",
col:"Column",
cell:"Cell"
},
autosave:{
unload_msg:"The changes you made will be lost if you navigate away from this page."
},
fullscreen:{
desc:"Toggle fullscreen mode"
},
media:{
desc:"Insert / edit embedded media",
edit:"Edit embedded media"
},
fullpage:{
desc:"Document properties"
},
template:{
desc:"Insert predefined template content"
},
visualchars:{
desc:"Visual control characters on/off."
},
spellchecker:{
desc:"Toggle spellchecker",
menu:"Spellchecker settings",
ignore_word:"Ignore word",
ignore_words:"Ignore all",
langs:"Languages",
wait:"Please wait...",
sug:"Suggestions",
no_sug:"No suggestions",
no_mpell:"No misspellings found."
},
pagebreak:{
desc:"Insert page break."
}}});

View File

@ -0,0 +1,400 @@
<?php
// escape text only if it needs translating
function mce_escape($text) {
global $language;
if ( 'en' == $language ) return $text;
else return js_escape($text);
}
$strings = 'tinyMCE.addI18n({' . $language . ':{
common:{
edit_confirm:"' . mce_escape( __('Do you want to use the WYSIWYG mode for this textarea?') ) . '",
apply:"' . mce_escape( __('Apply') ) . '",
insert:"' . mce_escape( __('Insert') ) . '",
update:"' . mce_escape( __('Update') ) . '",
cancel:"' . mce_escape( __('Cancel') ) . '",
close:"' . mce_escape( __('Close') ) . '",
browse:"' . mce_escape( __('Browse') ) . '",
class_name:"' . mce_escape( __('Class') ) . '",
not_set:"' . mce_escape( __('-- Not set --') ) . '",
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.') ) . '",
more_colors:"' . mce_escape( __('More colors') ) . '"
},
contextmenu:{
align:"' . mce_escape( __('Alignment') ) . '",
left:"' . mce_escape( __('Left') ) . '",
center:"' . mce_escape( __('Center') ) . '",
right:"' . mce_escape( __('Right') ) . '",
full:"' . mce_escape( __('Full') ) . '"
},
insertdatetime:{
date_fmt:"' . mce_escape( __('%Y-%m-%d') ) . '",
time_fmt:"' . mce_escape( __('%H:%M:%S') ) . '",
insertdate_desc:"' . mce_escape( __('Insert date') ) . '",
inserttime_desc:"' . mce_escape( __('Insert time') ) . '",
months_long:"' . mce_escape( _c('January,February,March,April,May,June,July,August,September,October,November,December|Comma separated list of the months. No spaces between them.') ) . '",
months_short:"' . mce_escape( _c('Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec|Comma separated list of the abbreviated names of the months. No spaces between them.') ) . '",
day_long:"' . mce_escape( _c('Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday|Comma separated list of the days of the week. No spaces between them.') ) . '",
day_short:"' . mce_escape( _c('Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun|Comma separated list of the abbreviated names for the days of the week. No spaces between them.') ) . '"
},
print:{
print_desc:"' . mce_escape( __('Print') ) . '"
},
preview:{
preview_desc:"' . mce_escape( __('Preview') ) . '"
},
directionality:{
ltr_desc:"' . mce_escape( __('Direction left to right') ) . '",
rtl_desc:"' . mce_escape( __('Direction right to left') ) . '"
},
layer:{
insertlayer_desc:"' . mce_escape( __('Insert new layer') ) . '",
forward_desc:"' . mce_escape( __('Move forward') ) . '",
backward_desc:"' . mce_escape( __('Move backward') ) . '",
absolute_desc:"' . mce_escape( __('Toggle absolute positioning') ) . '",
content:"' . mce_escape( __('New layer...') ) . '"
},
save:{
save_desc:"' . mce_escape( __('Save') ) . '",
cancel_desc:"' . mce_escape( __('Cancel all changes') ) . '"
},
nonbreaking:{
nonbreaking_desc:"' . mce_escape( __('Insert non-breaking space character') ) . '"
},
iespell:{
iespell_desc:"' . mce_escape( __('Run spell checking') ) . '",
download:"' . mce_escape( __('ieSpell not detected. Do you want to install it now?') ) . '"
},
advhr:{
advhr_desc:"' . mce_escape( __('Horizontale rule') ) . '"
},
emotions:{
emotions_desc:"' . mce_escape( __('Emotions') ) . '"
},
searchreplace:{
search_desc:"' . mce_escape( __('Find') ) . '",
replace_desc:"' . mce_escape( __('Find/Replace') ) . '"
},
advimage:{
image_desc:"' . mce_escape( __('Insert/edit image') ) . '"
},
advlink:{
link_desc:"' . mce_escape( __('Insert/edit link') ) . '"
},
xhtmlxtras:{
cite_desc:"' . mce_escape( __('Citation') ) . '",
abbr_desc:"' . mce_escape( __('Abbreviation') ) . '",
acronym_desc:"' . mce_escape( __('Acronym') ) . '",
del_desc:"' . mce_escape( __('Deletion') ) . '",
ins_desc:"' . mce_escape( __('Insertion') ) . '",
attribs_desc:"' . mce_escape( __('Insert/Edit Attributes') ) . '"
},
style:{
desc:"' . mce_escape( __('Edit CSS Style') ) . '"
},
paste:{
paste_text_desc:"' . mce_escape( __('Paste as Plain Text') ) . '",
paste_word_desc:"' . mce_escape( __('Paste from Word') ) . '",
selectall_desc:"' . mce_escape( __('Select All') ) . '"
},
paste_dlg:{
text_title:"' . mce_escape( __('Use CTRL+V on your keyboard to paste the text into the window.') ) . '",
text_linebreaks:"' . mce_escape( __('Keep linebreaks') ) . '",
word_title:"' . mce_escape( __('Use CTRL+V on your keyboard to paste the text into the window.') ) . '"
},
table:{
desc:"' . mce_escape( __('Inserts a new table') ) . '",
row_before_desc:"' . mce_escape( __('Insert row before') ) . '",
row_after_desc:"' . mce_escape( __('Insert row after') ) . '",
delete_row_desc:"' . mce_escape( __('Delete row') ) . '",
col_before_desc:"' . mce_escape( __('Insert column before') ) . '",
col_after_desc:"' . mce_escape( __('Insert column after') ) . '",
delete_col_desc:"' . mce_escape( __('Remove column') ) . '",
split_cells_desc:"' . mce_escape( __('Split merged table cells') ) . '",
merge_cells_desc:"' . mce_escape( __('Merge table cells') ) . '",
row_desc:"' . mce_escape( __('Table row properties') ) . '",
cell_desc:"' . mce_escape( __('Table cell properties') ) . '",
props_desc:"' . mce_escape( __('Table properties') ) . '",
paste_row_before_desc:"' . mce_escape( __('Paste table row before') ) . '",
paste_row_after_desc:"' . mce_escape( __('Paste table row after') ) . '",
cut_row_desc:"' . mce_escape( __('Cut table row') ) . '",
copy_row_desc:"' . mce_escape( __('Copy table row') ) . '",
del:"' . mce_escape( __('Delete table') ) . '",
row:"' . mce_escape( __('Row') ) . '",
col:"' . mce_escape( __('Column') ) . '",
cell:"' . mce_escape( __('Cell') ) . '"
},
autosave:{
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') ) . '"
},
media:{
desc:"' . mce_escape( __('Insert / edit embedded media') ) . '",
delta_width:"' . mce_escape( _c('0| Extra width for the media popup in pixels') ) . '",
delta_height:"' . mce_escape( _c('0| Extra height for the media popup in pixels') ) . '",
edit:"' . mce_escape( __('Edit embedded media') ) . '"
},
fullpage:{
desc:"' . mce_escape( __('Document properties') ) . '"
},
template:{
desc:"' . mce_escape( __('Insert predefined template content') ) . '"
},
visualchars:{
desc:"' . mce_escape( __('Visual control characters on/off.') ) . '"
},
spellchecker:{
desc:"' . mce_escape( __('Toggle spellchecker') ) . '",
menu:"' . mce_escape( __('Spellchecker settings') ) . '",
ignore_word:"' . mce_escape( __('Ignore word') ) . '",
ignore_words:"' . mce_escape( __('Ignore all') ) . '",
langs:"' . mce_escape( __('Languages') ) . '",
wait:"' . mce_escape( __('Please wait...') ) . '",
sug:"' . mce_escape( __('Suggestions') ) . '",
no_sug:"' . mce_escape( __('No suggestions') ) . '",
no_mpell:"' . mce_escape( __('No misspellings found.') ) . '"
},
pagebreak:{
desc:"' . mce_escape( __('Insert page break.') ) . '"
}}});
tinyMCE.addI18n("' . $language . '.advanced",{
style_select:"' . mce_escape( __('Styles') ) . '",
font_size:"' . mce_escape( __('Font size') ) . '",
fontdefault:"' . mce_escape( __('Font family') ) . '",
block:"' . mce_escape( __('Format') ) . '",
paragraph:"' . mce_escape( __('Paragraph') ) . '",
div:"' . mce_escape( __('Div') ) . '",
address:"' . mce_escape( __('Address') ) . '",
pre:"' . mce_escape( __('Preformatted') ) . '",
h1:"' . mce_escape( __('Heading 1') ) . '",
h2:"' . mce_escape( __('Heading 2') ) . '",
h3:"' . mce_escape( __('Heading 3') ) . '",
h4:"' . mce_escape( __('Heading 4') ) . '",
h5:"' . mce_escape( __('Heading 5') ) . '",
h6:"' . mce_escape( __('Heading 6') ) . '",
blockquote:"' . mce_escape( __('Blockquote') ) . '",
code:"' . mce_escape( __('Code') ) . '",
samp:"' . mce_escape( __('Code sample') ) . '",
dt:"' . mce_escape( __('Definition term ') ) . '",
dd:"' . mce_escape( __('Definition description') ) . '",
bold_desc:"' . mce_escape( __('Bold (Ctrl+B)') ) . '",
italic_desc:"' . mce_escape( __('Italic (Ctrl+I)') ) . '",
underline_desc:"' . mce_escape( __('Underline (Ctrl+U)') ) . '",
striketrough_desc:"' . mce_escape( __('Strikethrough') ) . '",
justifyleft_desc:"' . mce_escape( __('Align left') ) . '",
justifycenter_desc:"' . mce_escape( __('Align center') ) . '",
justifyright_desc:"' . mce_escape( __('Align right') ) . '",
justifyfull_desc:"' . mce_escape( __('Align full') ) . '",
bullist_desc:"' . mce_escape( __('Unordered list') ) . '",
numlist_desc:"' . mce_escape( __('Ordered list') ) . '",
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') ) . '",
link_delta_width:"' . mce_escape( _c('0| Extra width for the link popup in pixels') ) . '",
link_delta_height:"' . mce_escape( _c('0| Extra height for the link popup in pixels') ) . '",
unlink_desc:"' . mce_escape( __('Unlink') ) . '",
image_desc:"' . mce_escape( __('Insert/edit image') ) . '",
image_delta_width:"' . mce_escape( _c('0| Extra width for the image popup in pixels') ) . '",
image_delta_height:"' . mce_escape( _c('0| Extra height for the image popup in pixels') ) . '",
cleanup_desc:"' . mce_escape( __('Cleanup messy code') ) . '",
code_desc:"' . mce_escape( __('Edit HTML Source') ) . '",
sub_desc:"' . mce_escape( __('Subscript') ) . '",
sup_desc:"' . mce_escape( __('Superscript') ) . '",
hr_desc:"' . mce_escape( __('Insert horizontal ruler') ) . '",
removeformat_desc:"' . mce_escape( __('Remove formatting') ) . '",
forecolor_desc:"' . mce_escape( __('Select text color') ) . '",
backcolor_desc:"' . mce_escape( __('Select background color') ) . '",
charmap_desc:"' . mce_escape( __('Insert custom character') ) . '",
visualaid_desc:"' . mce_escape( __('Toggle guidelines/invisible elements') ) . '",
anchor_desc:"' . mce_escape( __('Insert/edit anchor') ) . '",
cut_desc:"' . mce_escape( __('Cut') ) . '",
copy_desc:"' . mce_escape( __('Copy') ) . '",
paste_desc:"' . mce_escape( __('Paste') ) . '",
image_props_desc:"' . mce_escape( __('Image properties') ) . '",
newdocument_desc:"' . mce_escape( __('New document') ) . '",
help_desc:"' . mce_escape( __('Help') ) . '",
blockquote_desc:"' . mce_escape( __('Blockquote') ) . '",
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:"' . mce_escape( _c('0| Extra width for the colorpicker popup in pixels') ) . '",
colorpicker_delta_height:"' . mce_escape( _c('0| Extra height for the colorpicker popup in pixels') ) . '"
});
tinyMCE.addI18n("' . $language . '.advanced_dlg",{
about_title:"' . mce_escape( __('About TinyMCE') ) . '",
about_general:"' . mce_escape( __('About') ) . '",
about_help:"' . mce_escape( __('Help') ) . '",
about_license:"' . mce_escape( __('License') ) . '",
about_plugins:"' . mce_escape( __('Plugins') ) . '",
about_plugin:"' . mce_escape( __('Plugin') ) . '",
about_author:"' . mce_escape( __('Author') ) . '",
about_version:"' . mce_escape( __('Version') ) . '",
about_loaded:"' . mce_escape( __('Loaded plugins') ) . '",
anchor_title:"' . mce_escape( __('Insert/edit anchor') ) . '",
anchor_name:"' . mce_escape( __('Anchor name') ) . '",
code_title:"' . mce_escape( __('HTML Source Editor') ) . '",
code_wordwrap:"' . mce_escape( __('Word wrap') ) . '",
colorpicker_title:"' . mce_escape( __('Select a color') ) . '",
colorpicker_picker_tab:"' . mce_escape( __('Picker') ) . '",
colorpicker_picker_title:"' . mce_escape( __('Color picker') ) . '",
colorpicker_palette_tab:"' . mce_escape( __('Palette') ) . '",
colorpicker_palette_title:"' . mce_escape( __('Palette colors') ) . '",
colorpicker_named_tab:"' . mce_escape( __('Named') ) . '",
colorpicker_named_title:"' . mce_escape( __('Named colors') ) . '",
colorpicker_color:"' . mce_escape( __('Color:') ) . '",
colorpicker_name:"' . mce_escape( __('Name:') ) . '",
charmap_title:"' . mce_escape( __('Select custom character') ) . '",
image_title:"' . mce_escape( __('Insert/edit image') ) . '",
image_src:"' . mce_escape( __('Image URL') ) . '",
image_alt:"' . mce_escape( __('Image description') ) . '",
image_list:"' . mce_escape( __('Image list') ) . '",
image_border:"' . mce_escape( __('Border') ) . '",
image_dimensions:"' . mce_escape( __('Dimensions') ) . '",
image_vspace:"' . mce_escape( __('Vertical space') ) . '",
image_hspace:"' . mce_escape( __('Horizontal space') ) . '",
image_align:"' . mce_escape( __('Alignment') ) . '",
image_align_baseline:"' . mce_escape( __('Baseline') ) . '",
image_align_top:"' . mce_escape( __('Top') ) . '",
image_align_middle:"' . mce_escape( __('Middle') ) . '",
image_align_bottom:"' . mce_escape( __('Bottom') ) . '",
image_align_texttop:"' . mce_escape( __('Text top') ) . '",
image_align_textbottom:"' . mce_escape( __('Text bottom') ) . '",
image_align_left:"' . mce_escape( __('Left') ) . '",
image_align_right:"' . mce_escape( __('Right') ) . '",
link_title:"' . mce_escape( __('Insert/edit link') ) . '",
link_url:"' . mce_escape( __('Link URL') ) . '",
link_target:"' . mce_escape( __('Target') ) . '",
link_target_same:"' . mce_escape( __('Open link in the same window') ) . '",
link_target_blank:"' . mce_escape( __('Open link in a new window') ) . '",
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') ) . '"
});
tinyMCE.addI18n("' . $language . '.media_dlg",{
title:"' . mce_escape( __('Insert / edit embedded media') ) . '",
general:"' . mce_escape( __('General') ) . '",
advanced:"' . mce_escape( __('Advanced') ) . '",
file:"' . mce_escape( __('File/URL') ) . '",
list:"' . mce_escape( __('List') ) . '",
size:"' . mce_escape( __('Dimensions') ) . '",
preview:"' . mce_escape( __('Preview') ) . '",
constrain_proportions:"' . mce_escape( __('Constrain proportions') ) . '",
type:"' . mce_escape( __('Type') ) . '",
id:"' . mce_escape( __('Id') ) . '",
name:"' . mce_escape( __('Name') ) . '",
class_name:"' . mce_escape( __('Class') ) . '",
vspace:"' . mce_escape( __('V-Space') ) . '",
hspace:"' . mce_escape( __('H-Space') ) . '",
play:"' . mce_escape( __('Auto play') ) . '",
loop:"' . mce_escape( __('Loop') ) . '",
menu:"' . mce_escape( __('Show menu') ) . '",
quality:"' . mce_escape( __('Quality') ) . '",
scale:"' . mce_escape( __('Scale') ) . '",
align:"' . mce_escape( __('Align') ) . '",
salign:"' . mce_escape( __('SAlign') ) . '",
wmode:"' . mce_escape( __('WMode') ) . '",
bgcolor:"' . mce_escape( __('Background') ) . '",
base:"' . mce_escape( __('Base') ) . '",
flashvars:"' . mce_escape( __('Flashvars') ) . '",
liveconnect:"' . mce_escape( __('SWLiveConnect') ) . '",
autohref:"' . mce_escape( __('AutoHREF') ) . '",
cache:"' . mce_escape( __('Cache') ) . '",
hidden:"' . mce_escape( __('Hidden') ) . '",
controller:"' . mce_escape( __('Controller') ) . '",
kioskmode:"' . mce_escape( __('Kiosk mode') ) . '",
playeveryframe:"' . mce_escape( __('Play every frame') ) . '",
targetcache:"' . mce_escape( __('Target cache') ) . '",
correction:"' . mce_escape( __('No correction') ) . '",
enablejavascript:"' . mce_escape( __('Enable JavaScript') ) . '",
starttime:"' . mce_escape( __('Start time') ) . '",
endtime:"' . mce_escape( __('End time') ) . '",
href:"' . mce_escape( __('Href') ) . '",
qtsrcchokespeed:"' . mce_escape( __('Choke speed') ) . '",
target:"' . mce_escape( __('Target') ) . '",
volume:"' . mce_escape( __('Volume') ) . '",
autostart:"' . mce_escape( __('Auto start') ) . '",
enabled:"' . mce_escape( __('Enabled') ) . '",
fullscreen:"' . mce_escape( __('Fullscreen') ) . '",
invokeurls:"' . mce_escape( __('Invoke URLs') ) . '",
mute:"' . mce_escape( __('Mute') ) . '",
stretchtofit:"' . mce_escape( __('Stretch to fit') ) . '",
windowlessvideo:"' . mce_escape( __('Windowless video') ) . '",
balance:"' . mce_escape( __('Balance') ) . '",
baseurl:"' . mce_escape( __('Base URL') ) . '",
captioningid:"' . mce_escape( __('Captioning id') ) . '",
currentmarker:"' . mce_escape( __('Current marker') ) . '",
currentposition:"' . mce_escape( __('Current position') ) . '",
defaultframe:"' . mce_escape( __('Default frame') ) . '",
playcount:"' . mce_escape( __('Play count') ) . '",
rate:"' . mce_escape( __('Rate') ) . '",
uimode:"' . mce_escape( __('UI Mode') ) . '",
flash_options:"' . mce_escape( __('Flash options') ) . '",
qt_options:"' . mce_escape( __('Quicktime options') ) . '",
wmp_options:"' . mce_escape( __('Windows media player options') ) . '",
rmp_options:"' . mce_escape( __('Real media player options') ) . '",
shockwave_options:"' . mce_escape( __('Shockwave options') ) . '",
autogotourl:"' . mce_escape( __('Auto goto URL') ) . '",
center:"' . mce_escape( __('Center') ) . '",
imagestatus:"' . mce_escape( __('Image status') ) . '",
maintainaspect:"' . mce_escape( __('Maintain aspect') ) . '",
nojava:"' . mce_escape( __('No java') ) . '",
prefetch:"' . mce_escape( __('Prefetch') ) . '",
shuffle:"' . mce_escape( __('Shuffle') ) . '",
console:"' . mce_escape( __('Console') ) . '",
numloop:"' . mce_escape( __('Num loops') ) . '",
controls:"' . mce_escape( __('Controls') ) . '",
scriptcallbacks:"' . mce_escape( __('Script callbacks') ) . '",
swstretchstyle:"' . mce_escape( __('Stretch style') ) . '",
swstretchhalign:"' . mce_escape( __('Stretch H-Align') ) . '",
swstretchvalign:"' . mce_escape( __('Stretch V-Align') ) . '",
sound:"' . mce_escape( __('Sound') ) . '",
progress:"' . mce_escape( __('Progress') ) . '",
qtsrc:"' . mce_escape( __('QT Src') ) . '",
qt_stream_warn:"' . mce_escape( __('Streamed rtsp resources should be added to the QT Src field under the advanced tab.') ) . '",
align_top:"' . mce_escape( __('Top') ) . '",
align_right:"' . mce_escape( __('Right') ) . '",
align_bottom:"' . mce_escape( __('Bottom') ) . '",
align_left:"' . mce_escape( __('Left') ) . '",
align_center:"' . mce_escape( __('Center') ) . '",
align_top_left:"' . mce_escape( __('Top left') ) . '",
align_top_right:"' . mce_escape( __('Top right') ) . '",
align_bottom_left:"' . mce_escape( __('Bottom left') ) . '",
align_bottom_right:"' . mce_escape( __('Bottom right') ) . '",
flv_options:"' . mce_escape( __('Flash video options') ) . '",
flv_scalemode:"' . mce_escape( __('Scale mode') ) . '",
flv_buffer:"' . mce_escape( __('Buffer') ) . '",
flv_startimage:"' . mce_escape( __('Start image') ) . '",
flv_starttime:"' . mce_escape( __('Start time') ) . '",
flv_defaultvolume:"' . mce_escape( __('Default volumne') ) . '",
flv_hiddengui:"' . mce_escape( __('Hidden GUI') ) . '",
flv_autostart:"' . mce_escape( __('Auto start') ) . '",
flv_loop:"' . mce_escape( __('Loop') ) . '",
flv_showscalemodes:"' . mce_escape( __('Show scale modes') ) . '",
flv_smoothvideo:"' . mce_escape( __('Smooth video') ) . '",
flv_jscallback:"' . mce_escape( __('JS Callback') ) . '"
});
tinyMCE.addI18n("' . $language . '.wordpress",{
wp_adv_desc:"' . mce_escape( __('Show/Hide Advanced Toolbar') ) . '",
wp_more_desc:"' . mce_escape( __('Insert More tag') ) . '",
wp_page_desc:"' . mce_escape( __('Insert Page break') ) . '",
wp_help_desc:"' . mce_escape( __('Help') ) . '",
wp_more_alt:"' . mce_escape( __('More...') ) . '",
wp_page_alt:"' . mce_escape( __('Next page...') ) . '"
});
'; ?>

View File

@ -1,103 +0,0 @@
tinyMCE.addI18n('en.media_dlg',{
title:"Insert / edit embedded media",
general:"General",
advanced:"Advanced",
file:"File/URL",
list:"List",
size:"Dimensions",
preview:"Preview",
constrain_proportions:"Constrain proportions",
type:"Type",
id:"Id",
name:"Name",
class_name:"Class",
vspace:"V-Space",
hspace:"H-Space",
play:"Auto play",
loop:"Loop",
menu:"Show menu",
quality:"Quality",
scale:"Scale",
align:"Align",
salign:"SAlign",
wmode:"WMode",
bgcolor:"Background",
base:"Base",
flashvars:"Flashvars",
liveconnect:"SWLiveConnect",
autohref:"AutoHREF",
cache:"Cache",
hidden:"Hidden",
controller:"Controller",
kioskmode:"Kiosk mode",
playeveryframe:"Play every frame",
targetcache:"Target cache",
correction:"No correction",
enablejavascript:"Enable JavaScript",
starttime:"Start time",
endtime:"End time",
href:"Href",
qtsrcchokespeed:"Choke speed",
target:"Target",
volume:"Volume",
autostart:"Auto start",
enabled:"Enabled",
fullscreen:"Fullscreen",
invokeurls:"Invoke URLs",
mute:"Mute",
stretchtofit:"Stretch to fit",
windowlessvideo:"Windowless video",
balance:"Balance",
baseurl:"Base URL",
captioningid:"Captioning id",
currentmarker:"Current marker",
currentposition:"Current position",
defaultframe:"Default frame",
playcount:"Play count",
rate:"Rate",
uimode:"UI Mode",
flash_options:"Flash options",
qt_options:"Quicktime options",
wmp_options:"Windows media player options",
rmp_options:"Real media player options",
shockwave_options:"Shockwave options",
autogotourl:"Auto goto URL",
center:"Center",
imagestatus:"Image status",
maintainaspect:"Maintain aspect",
nojava:"No java",
prefetch:"Prefetch",
shuffle:"Shuffle",
console:"Console",
numloop:"Num loops",
controls:"Controls",
scriptcallbacks:"Script callbacks",
swstretchstyle:"Stretch style",
swstretchhalign:"Stretch H-Align",
swstretchvalign:"Stretch V-Align",
sound:"Sound",
progress:"Progress",
qtsrc:"QT Src",
qt_stream_warn:"Streamed rtsp resources should be added to the QT Src field under the advanced tab.\nYou should also add a non streamed version to the Src field..",
align_top:"Top",
align_right:"Right",
align_bottom:"Bottom",
align_left:"Left",
align_center:"Center",
align_top_left:"Top left",
align_top_right:"Top right",
align_bottom_left:"Bottom left",
align_bottom_right:"Bottom right",
flv_options:"Flash video options",
flv_scalemode:"Scale mode",
flv_buffer:"Buffer",
flv_startimage:"Start image",
flv_starttime:"Start time",
flv_defaultvolume:"Default volumne",
flv_hiddengui:"Hidden GUI",
flv_autostart:"Auto start",
flv_loop:"Loop",
flv_showscalemodes:"Show scale modes",
flv_smoothvideo:"Smooth video",
flv_jscallback:"JS Callback"
});

View File

@ -1,5 +0,0 @@
tinyMCE.addI18n('en.paste_dlg',{
text_title:"Use CTRL+V on your keyboard to paste the text into the window.",
text_linebreaks:"Keep linebreaks",
word_title:"Use CTRL+V on your keyboard to paste the text into the window."
});

View File

@ -1,8 +0,0 @@
tinyMCE.addI18n('en.wordpress',{
wp_adv_desc : 'Show/Hide Advanced Toolbar',
wp_more_desc : 'Split post with More tag',
wp_page_desc : 'Split post with Page tag',
wp_help_desc : 'Help',
wp_more_alt : 'More...',
wp_page_alt : 'Next page...'
});

View File

@ -1,62 +0,0 @@
tinyMCE.addI18n('en.advanced',{
style_select:"Styles",
font_size:"Font size",
fontdefault:"Font family",
block:"Format",
paragraph:"Paragraph",
div:"Div",
address:"Address",
pre:"Preformatted",
h1:"Heading 1",
h2:"Heading 2",
h3:"Heading 3",
h4:"Heading 4",
h5:"Heading 5",
h6:"Heading 6",
blockquote:"Blockquote",
code:"Code",
samp:"Code sample",
dt:"Definition term ",
dd:"Definition description",
bold_desc:"Bold (Ctrl+B)",
italic_desc:"Italic (Ctrl+I)",
underline_desc:"Underline (Ctrl+U)",
striketrough_desc:"Strikethrough",
justifyleft_desc:"Align left",
justifycenter_desc:"Align center",
justifyright_desc:"Align right",
justifyfull_desc:"Align full",
bullist_desc:"Unordered list",
numlist_desc:"Ordered list",
outdent_desc:"Outdent",
indent_desc:"Indent",
undo_desc:"Undo (Ctrl+Z)",
redo_desc:"Redo (Ctrl+Y)",
link_desc:"Insert/edit link",
unlink_desc:"Unlink",
image_desc:"Insert/edit image",
cleanup_desc:"Cleanup messy code",
code_desc:"Edit HTML Source",
sub_desc:"Subscript",
sup_desc:"Superscript",
hr_desc:"Insert horizontal ruler",
removeformat_desc:"Remove formatting",
custom1_desc:"Your custom description here",
forecolor_desc:"Select text color",
backcolor_desc:"Select background color",
charmap_desc:"Insert custom character",
visualaid_desc:"Toggle guidelines/invisible elements",
anchor_desc:"Insert/edit anchor",
cut_desc:"Cut",
copy_desc:"Copy",
paste_desc:"Paste",
image_props_desc:"Image properties",
newdocument_desc:"New document",
help_desc:"Help",
blockquote_desc:"Blockquote",
clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\r\nDo you want more information about this issue?",
path:"Path",
newdocument:"Are you sure you want clear all contents?",
toolbar_focus:"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X",
more_colors:"More colors"
});

View File

@ -1,51 +0,0 @@
tinyMCE.addI18n('en.advanced_dlg',{
about_title:"About TinyMCE",
about_general:"About",
about_help:"Help",
about_license:"License",
about_plugins:"Plugins",
about_plugin:"Plugin",
about_author:"Author",
about_version:"Version",
about_loaded:"Loaded plugins",
anchor_title:"Insert/edit anchor",
anchor_name:"Anchor name",
code_title:"HTML Source Editor",
code_wordwrap:"Word wrap",
colorpicker_title:"Select a color",
colorpicker_picker_tab:"Picker",
colorpicker_picker_title:"Color picker",
colorpicker_palette_tab:"Palette",
colorpicker_palette_title:"Palette colors",
colorpicker_named_tab:"Named",
colorpicker_named_title:"Named colors",
colorpicker_color:"Color:",
colorpicker_name:"Name:",
charmap_title:"Select custom character",
image_title:"Insert/edit image",
image_src:"Image URL",
image_alt:"Image description",
image_list:"Image list",
image_border:"Border",
image_dimensions:"Dimensions",
image_vspace:"Vertical space",
image_hspace:"Horizontal space",
image_align:"Alignment",
image_align_baseline:"Baseline",
image_align_top:"Top",
image_align_middle:"Middle",
image_align_bottom:"Bottom",
image_align_texttop:"Text top",
image_align_textbottom:"Text bottom",
image_align_left:"Left",
image_align_right:"Right",
link_title:"Insert/edit link",
link_url:"Link URL",
link_target:"Target",
link_target_same:"Open link in the same window",
link_target_blank:"Open link in a new window",
link_titlefield:"Title",
link_is_email:"The URL you entered seems to be an email address, do you want to add the required mailto: prefix?",
link_is_external:"The URL you entered seems to external link, do you want to add the required http:// prefix?",
link_list:"Link list"
});

View File

@ -2,7 +2,8 @@
@ require('../../../wp-config.php');
cache_javascript_headers();
function wp_translate_tinymce_lang($text) {
// deprecated
function wp_translate_tinymce_lang($text) {
if ( ! function_exists('__') ) {
return $text;
} else {
@ -52,7 +53,7 @@
if ( $_SERVER['HTTPS'] == 'on' )
$mce_css = str_replace('http://', 'https://', $mce_css);
$mce_locale = ( '' == get_locale() ) ? 'en' : strtolower(get_locale());
$mce_locale = ( '' == get_locale() ) ? 'en' : strtolower( substr(get_locale(), 0, 2) ); // only ISO 639-1
?>
initArray = {
@ -76,10 +77,6 @@ initArray = {
convert_urls : false,
relative_urls : false,
remove_script_host : false,
force_p_newlines : true,
force_br_newlines : false,
convert_newlines_to_brs : false,
remove_linebreaks : false,
fix_list_elements : true,
fix_table_elements : true,
gecko_spellcheck : true,
@ -89,7 +86,7 @@ initArray = {
content_css : "<?php echo $mce_css; ?>",
<?php if ( $valid_elements ) echo 'valid_elements : "' . $valid_elements . '",' . "\n"; ?>
<?php if ( $invalid_elements ) echo 'invalid_elements : "' . $invalid_elements . '",' . "\n"; ?>
save_callback : "switchEditors.saveCallback",
save_callback : "switchEditors.saveCallback",
<?php do_action('mce_options'); ?>
plugins : "<?php echo $plugins; ?>"
};

View File

@ -1,5 +1,5 @@
<?php
/**
/** Based on:
* $Id: tiny_mce_gzip.php 315 2007-10-25 14:03:43Z spocke $
*
* @author Moxiecode
@ -10,18 +10,12 @@
* Notice: This script defaults the button_tile_map option to true for extra performance.
*/
//error_reporting(E_ALL);
@require_once('../../../wp-config.php'); // For get_bloginfo().
// Headers
$expiresOffset = 3600 * 24 * 10; // Cache for 10 days in browser cache
header("Content-type: text/javascript");
header("Vary: Accept-Encoding"); // Handle proxies
header("Expires: " . gmdate("D, d M Y H:i:s", time() + $expiresOffset) . " GMT");
@require_once('../../../wp-config.php'); // For get_bloginfo().
cache_javascript_headers();
if ( isset($_GET['load']) ) {
function getParam( $name, $def = false ) {
function getParam( $name, $def = false ) {
if ( ! isset($_GET[$name]) )
return $def;
@ -31,7 +25,7 @@ if ( isset($_GET['load']) ) {
function getFileContents($path) {
$path = realpath($path);
if ( !$path || !@is_file($path) )
if ( ! $path || !@is_file($path) )
return '';
if ( function_exists('file_get_contents') )
@ -52,7 +46,7 @@ if ( isset($_GET['load']) ) {
function putFileContents( $path, $content ) {
if ( function_exists('file_put_contents') )
return @file_put_contents($path, $content);
return @file_put_contents( $path, $content );
$fp = @fopen($path, 'wb');
if ($fp) {
@ -61,40 +55,19 @@ if ( isset($_GET['load']) ) {
}
}
// WP defaults
$themes = explode( ',', getParam('themes', 'advanced') );
$language = getParam( 'languages', 'en' );
$language = strtolower( substr($language, 0, 2) ); // only ISO 639-1
// Get input
$plugins = explode( ',', getParam('plugins', '') );
$languages = explode( ',', getParam('languages', '') );
$themes = explode( ',', getParam('themes', '') );
$diskCache = getParam( 'diskcache', '' ) == 'true';
$isJS = getParam( 'js', '' ) == 'true';
$compress = getParam( 'compress', 'true' ) == 'true';
$core = getParam( 'core', 'true' ) == 'true';
$suffix = getParam( 'suffix', '_src' ) == '_src' ? '_src' : '';
$cachePath = realpath('.'); // Cache path, this is where the .gz files will be stored
$content = '';
$encodings = array();
$supportsGzip = false;
$enc = '';
$cacheKey = '';
// WP. Language handling could be improved... Concat all translated langs files and store in /wp-content/languages as .mo?
$theme = getParam( 'theme', 'advanced' );
$themes = array($theme);
$language = getParam( 'language', 'en' );
$languages = array($language);
if ( $language != strtolower($language) )
$languages[] = strtolower($language);
if ( $language != substr($language, 0, 2) )
$languages[] = substr($language, 0, 2);
$diskCache = false;
$isJS = true;
$suffix = '';
$supportsGzip = $diskCache = false;
$compress = $core = true;
$suffix = $content = $enc = $cacheKey = '';
// Custom extra javascripts to pack
// WP - add a hook for external plugins to be compressed too?
@ -103,14 +76,7 @@ if ( isset($_GET['load']) ) {
'some custom .js file'
*/);
// Is called directly then auto init with default settings
if ( ! $isJS ) {
echo getFileContents('tiny_mce_gzip.js');
echo 'tinyMCE_GZ.init({});';
die();
}
// Setup cache info
// Setup cache info
if ( $diskCache ) {
if ( ! $cachePath )
die('Real path failed.');
@ -129,10 +95,10 @@ if ( isset($_GET['load']) ) {
}
// Check if it supports gzip
if ( isset($_SERVER['HTTP_ACCEPT_ENCODING']) )
$encodings = explode( ',', strtolower( preg_replace('/\s+/', '', $_SERVER['HTTP_ACCEPT_ENCODING']) ) );
if ( isset( $_SERVER['HTTP_ACCEPT_ENCODING'] ) )
$encodings = explode(',', strtolower(preg_replace( '/\s+/', '', $_SERVER['HTTP_ACCEPT_ENCODING']) ) );
if ( ( in_array('gzip', $encodings) || in_array('x-gzip', $encodings) || isset($_SERVER['---------------']) ) && function_exists('ob_gzhandler') && !ini_get('zlib.output_compression') ) {
if ( ( in_array('gzip', $encodings ) || in_array( 'x-gzip', $encodings ) || isset($_SERVER['---------------']) ) && function_exists( 'ob_gzhandler' ) && ! ini_get('zlib.output_compression') ) {
$enc = in_array( 'x-gzip', $encodings ) ? 'x-gzip' : 'gzip';
$supportsGzip = true;
}
@ -142,55 +108,29 @@ if ( isset($_GET['load']) ) {
if ( $compress )
header('Content-Encoding: ' . $enc);
echo getFileContents($cacheFile);
echo getFileContents( $cacheFile );
die();
}
// Add core
if ( $core == 'true' ) {
$content .= getFileContents('tiny_mce' . $suffix . '.js');
$content .= getFileContents( 'tiny_mce' . $suffix . '.js' );
// Patch loading functions
$content .= 'tinyMCE_GZ.start();';
}
// Add core languages
$lang_content = '';
foreach ( $languages as $lang )
$lang_content .= getFileContents('langs/' . $lang . '.js');
if ( empty($lang_content) && file_exists('langs/en.js') )
$lang_content .= getFileContents('langs/en.js');
$content .= $lang_content;
// Add all languages (WP)
include_once( dirname(__file__).'/langs/wp-langs.php' );
$content .= $strings;
// Add themes
foreach ( $themes as $theme ) {
$content .= getFileContents( 'themes/' . $theme . '/editor_template' . $suffix . '.js');
$lang_content = '';
foreach ( $languages as $lang )
$lang_content .= getFileContents( 'themes/' . $theme . '/langs/' . $lang . '.js' );
if ( empty($lang_content) && file_exists( 'themes/' . $theme . '/langs/en.js' ) )
$lang_content .= getFileContents( 'themes/' . $theme . '/langs/en.js' );
$content .= $lang_content;
}
foreach ( $themes as $theme )
$content .= getFileContents( 'themes/' . $theme . '/editor_template' . $suffix . '.js' );
// Add plugins
foreach ( $plugins as $plugin ) {
$content .= getFileContents('plugins/' . $plugin . '/editor_plugin' . $suffix . '.js');
$lang_content = '';
foreach ( $languages as $lang )
$lang_content .= getFileContents( 'plugins/' . $plugin . '/langs/' . $lang . '.js' );
if ( empty($lang_content) && file_exists( 'plugins/' . $plugin . '/langs/en.js' ) )
$lang_content .= getFileContents( 'plugins/' . $plugin . '/langs/en.js' );
$content .= $lang_content;
}
foreach ( $plugins as $plugin )
$content .= getFileContents( 'plugins/' . $plugin . '/editor_plugin' . $suffix . '.js' );
// Add custom files
foreach ( $custom as $file )
@ -209,7 +149,7 @@ if ( isset($_GET['load']) ) {
$cacheData = $content;
// Write gz file
if ( $diskCache && $cacheKey != '' )
if ( $diskCache && '' != $cacheKey )
putFileContents( $cacheFile, $cacheData );
// Stream to client
@ -236,18 +176,19 @@ var tinyMCE_GZ = {
suffix : ''
},
opt : {},
opt : {},
init : function(arr, cb) {
var t = this, n, s, nl = document.getElementsByTagName('script');
init : function(o, cb) {
var t = this, n, s = t.settings, nl = document.getElementsByTagName('script');
t.opt = arr;
t.opt = o;
t.settings.themes = arr.theme;
t.settings.plugins = arr.plugins;
t.settings.languages = arr.language;
s = t.settings;
t.cb = cb || '';
s.themes = o.theme;
s.plugins = o.plugins;
s.languages = o.language;
t.settings = s;
t.cb = cb || '';
for (i=0; i<nl.length; i++) {
n = nl[i];
@ -255,8 +196,8 @@ var tinyMCE_GZ = {
if (n.src && n.src.indexOf('tiny_mce') != -1)
t.baseURL = n.src.substring(0, n.src.lastIndexOf('/'));
}
tinyMCEPreInit.base = t.baseURL;
tinyMCEPreInit.base = t.baseURL;
if (!t.coreLoaded)
t.loadScripts(1, s.themes, s.plugins, s.languages);
},
@ -281,7 +222,6 @@ var tinyMCE_GZ = {
if (co)
t.coreLoaded = 1;
// Easier to debug with this...
// document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + t.baseURL + '/' + s.page_name + '?' + q + '"></script>');
// Send request

View File

@ -83,7 +83,7 @@ tinyMCEPopup = {
requireLangPack : function() {
var u = this.getWindowArg('plugin_url') || this.getWindowArg('theme_url');
if (u)
if (u && u.indexOf('wp-includes') == -1 )
document.write('<script type="text/javascript" src="' + u + '/langs/' + this.editor.settings.language + '_dlg.js' + '"></script>');
},

View File

@ -30,7 +30,7 @@ class WP_Scripts {
$this->add( 'colorpicker', '/wp-includes/js/colorpicker.js', false, '3517' );
// Modify this version when tinyMCE plugins are changed
$this->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_gzip.php', false, '20080129' );
$this->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_gzip.php', false, '20080208' );
$mce_config = apply_filters('tiny_mce_config_url', '/wp-includes/js/tinymce/tiny_mce_config.php');
$this->add( 'wp_tiny_mce', $mce_config, array('tiny_mce'), '20080129' );