Commit e5a8c206 by Jair López

Add localization to plugins under qa-plugin

parent a77252ab
<?php
/*
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
Description: Language phrases for AdSense widget plugin
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
More about this license: http://www.question2answer.org/license.php
*/
return array(
'ad_unit_id' => 'AdSense Ad Unit ID:',
'example_x' => 'Example: <i>^</i>',
'publisher_id' => 'AdSense Publisher ID:',
);
......@@ -48,26 +48,26 @@ class qa_basic_adsense
}
return array(
'ok' => $saved ? 'AdSense settings saved' : null,
'ok' => $saved ? qa_lang_html('admin/options_saved') : null,
'fields' => array(
array(
'label' => 'AdSense Publisher ID:',
'label' => qa_lang_html('basic_adsense/publisher_id'),
'value' => qa_html(qa_opt('adsense_publisher_id')),
'tags' => 'name="adsense_publisher_id_field"',
'note' => 'Example: <i>pub-1234567890123456</i>',
'note' => qa_lang_sub('basic_adsense/example_x', 'pub-1234567890123456'),
),
array(
'label' => 'AdSense Ad Unit ID:',
'label' => qa_lang_html('basic_adsense/ad_unit_id'),
'value' => qa_html(qa_opt('adsense_adunit_id')),
'tags' => 'name="adsense_adunit_id_field"',
'note' => 'Example: <i>8XXXXX1</i>',
'note' => qa_lang_sub('basic_adsense/example_x', '8XXXXX1'),
),
),
'buttons' => array(
array(
'label' => 'Save Changes',
'label' => qa_lang_html('main/save_button'),
'tags' => 'name="adsense_save_button"',
),
),
......
......@@ -41,3 +41,4 @@ if (!defined('QA_VERSION')) { // don't allow this page to be requested directly
qa_register_plugin_module('widget', 'qa-basic-adsense.php', 'qa_basic_adsense', 'Basic AdSense');
qa_register_plugin_phrases('qa-basic-adsense-lang-*.php', 'basic_adsense');
<?php
/*
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
Description: Language phrases for event logger plugin
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
More about this license: http://www.question2answer.org/license.php
*/
return array(
'dir_for_log_files' => 'Directory for log files - enter full path:',
'dir_not_found' => 'This directory cannot be found. Please enter the full path.',
'dir_not_writable' => 'This directory is not writable by the web server. Please choose a different directory, use chown/chmod to change permissions, or contact your web hosting company for assistance.',
'enter_directory' => 'This is a file. Please enter the full path of a directory.',
'extras' => 'extras...',
'header_lines_top_each_file' => 'Include header lines at top of each log file',
'log_events_to_daily_log_files' => 'Log events to daily log files',
'log_events_to_x_table' => 'Log events to <code>^</code> database table',
'q2a_x_log_file_generated' => 'Question2Answer ^ log file generated by Event Logger plugin.',
'specify_dir_writable' => 'Please specify a directory that is writable by the web server.',
'utf8_tab_delimited_file' => 'This file is formatted as tab-delimited text with UTF-8 encoding.',
);
......@@ -82,13 +82,13 @@ class qa_event_logger
$error = null;
if (!strlen($directory))
$note = 'Please specify a directory that is writable by the web server.';
$note = qa_lang_html('event_logger/specify_dir_writable');
elseif (!file_exists($directory))
$error = 'This directory cannot be found. Please enter the full path.';
$error = qa_lang_html('event_logger/dir_not_found');
elseif (!is_dir($directory))
$error = 'This is a file. Please enter the full path of a directory.';
$error = qa_lang_html('event_logger/enter_directory');
elseif (!is_writable($directory))
$error = 'This directory is not writable by the web server. Please choose a different directory, use chown/chmod to change permissions, or contact your web hosting company for assistance.';
$error = qa_lang_html('event_logger/dir_not_writable');
// Create the form for display
......@@ -98,18 +98,18 @@ class qa_event_logger
));
return array(
'ok' => ($saved && !isset($error)) ? 'Event log settings saved' : null,
'ok' => ($saved && !isset($error)) ? qa_lang_html('admin/options_saved') : null,
'fields' => array(
array(
'label' => 'Log events to <code>' . QA_MYSQL_TABLE_PREFIX . 'eventlog</code> database table',
'label' => qa_lang_sub('event_logger/log_events_to_x_table', QA_MYSQL_TABLE_PREFIX . 'eventlog'),
'tags' => 'name="event_logger_to_database_field"',
'value' => qa_opt('event_logger_to_database'),
'type' => 'checkbox',
),
array(
'label' => 'Log events to daily log files',
'label' => qa_lang_html('event_logger/log_events_to_daily_log_files'),
'tags' => 'name="event_logger_to_files_field" id="event_logger_to_files_field"',
'value' => qa_opt('event_logger_to_files'),
'type' => 'checkbox',
......@@ -117,7 +117,7 @@ class qa_event_logger
array(
'id' => 'event_logger_directory_display',
'label' => 'Directory for log files - enter full path:',
'label' => qa_lang_html('event_logger/dir_for_log_files'),
'value' => qa_html($directory),
'tags' => 'name="event_logger_directory_field"',
'note' => $note,
......@@ -126,7 +126,7 @@ class qa_event_logger
array(
'id' => 'event_logger_hide_header_display',
'label' => 'Include header lines at top of each log file',
'label' => qa_lang_html('event_logger/header_lines_top_each_file'),
'type' => 'checkbox',
'tags' => 'name="event_logger_hide_header_field"',
'value' => !qa_opt('event_logger_hide_header'),
......@@ -135,7 +135,7 @@ class qa_event_logger
'buttons' => array(
array(
'label' => 'Save Changes',
'label' => qa_lang_html('main/save_button'),
'tags' => 'name="event_logger_save_button"',
),
),
......@@ -225,9 +225,9 @@ class qa_event_logger
if (is_resource($file)) {
if (flock($file, LOCK_EX)) {
if (!$exists && filesize($filename) === 0 && !qa_opt('event_logger_hide_header')) {
$string = "Question2Answer " . QA_VERSION . " log file generated by Event Logger plugin.\n" .
"This file is formatted as tab-delimited text with UTF-8 encoding.\n\n" .
implode("\t", array_keys($fixedfields)) . "\textras...\n\n" . $string;
$string = qa_lang_html_sub('event_logger/q2a_x_log_file_generated', QA_VERSION) . "\n" .
qa_lang_html('event_logger/utf8_tab_delimited_file') . "\n\n" .
implode("\t", array_keys($fixedfields)) . "\t" . qa_lang_html('event_logger/extras') . "\n\n" . $string;
}
fwrite($file, $string . "\n");
......
......@@ -41,3 +41,4 @@ if (!defined('QA_VERSION')) { // don't allow this page to be requested directly
qa_register_plugin_module('event', 'qa-event-logger.php', 'qa_event_logger', 'Event Logger');
qa_register_plugin_phrases('qa-event-logger-lang-*.php', 'event_logger');
<?php
/*
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
Description: Language phrases for Facebook login plugin
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
More about this license: http://www.question2answer.org/license.php
*/
return array(
'app_id' => 'Facebook App ID:',
'app_secret' => 'Facebook App Secret:',
'set_up_facebook_app' => 'To use Facebook Login, please ^1set up a Facebook application^2.',
);
......@@ -99,26 +99,29 @@ class qa_facebook_login
$ready = strlen(qa_opt('facebook_app_id')) && strlen(qa_opt('facebook_app_secret'));
return array(
'ok' => $saved ? 'Facebook application details saved' : null,
'ok' => $saved ? qa_lang_html('admin/options_saved') : null,
'fields' => array(
array(
'label' => 'Facebook App ID:',
'label' => qa_lang_html('facebook_login/app_id'),
'value' => qa_html(qa_opt('facebook_app_id')),
'tags' => 'name="facebook_app_id_field"',
),
array(
'label' => 'Facebook App Secret:',
'label' => qa_lang_html('facebook_login/app_secret'),
'value' => qa_html(qa_opt('facebook_app_secret')),
'tags' => 'name="facebook_app_secret_field"',
'error' => $ready ? null : 'To use Facebook Login, please <a href="http://developers.facebook.com/setup/" target="_blank">set up a Facebook application</a>.',
'error' => $ready ? null : strtr(qa_lang_html('facebook_login/set_up_facebook_app'), array(
'^1' => '<a href="https://developers.facebook.com/setup/" target="_blank">',
'^2' => '</a>'
))
),
),
'buttons' => array(
array(
'label' => 'Save Changes',
'label' => qa_lang_html('main/save_button'),
'tags' => 'name="facebook_save_button"',
),
),
......
......@@ -46,4 +46,5 @@ if (!QA_FINAL_EXTERNAL_USERS) {
qa_register_plugin_module('login', 'qa-facebook-login.php', 'qa_facebook_login', 'Facebook Login');
qa_register_plugin_module('page', 'qa-facebook-login-page.php', 'qa_facebook_login_page', 'Facebook Login Page');
qa_register_plugin_layer('qa-facebook-layer.php', 'Facebook Login Layer');
qa_register_plugin_phrases('qa-facebook-login-lang-*.php', 'facebook_login');
}
......@@ -43,11 +43,11 @@ class qa_mouseover_admin_form
));
return array(
'ok' => $saved ? 'Mouseover settings saved' : null,
'ok' => $saved ? qa_lang_html('admin/options_saved') : null,
'fields' => array(
array(
'label' => 'Show content preview on mouseover in question lists',
'label' => qa_lang_html('mouseover/show_content_prev_in_ql'),
'type' => 'checkbox',
'value' => qa_opt('mouseover_content_on'),
'tags' => 'name="mouseover_content_on_field" id="mouseover_content_on_field"',
......@@ -55,8 +55,8 @@ class qa_mouseover_admin_form
array(
'id' => 'mouseover_content_max_len_display',
'label' => 'Maximum length of preview:',
'suffix' => 'characters',
'label' => qa_lang_html('mouseover/maximum_length'),
'suffix' => qa_lang_html('mouseover/characters'),
'type' => 'number',
'value' => (int) qa_opt('mouseover_content_max_len'),
'tags' => 'name="mouseover_content_max_len_field"',
......@@ -65,7 +65,7 @@ class qa_mouseover_admin_form
'buttons' => array(
array(
'label' => 'Save Changes',
'label' => qa_lang_html('main/save_button'),
'tags' => 'name="mouseover_save_button"',
),
),
......
<?php
/*
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
Description: Language phrases for mouseover layer plugin
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
More about this license: http://www.question2answer.org/license.php
*/
return array(
'characters' => 'characters',
'maximum_length' => 'Maximum length of preview:',
'show_content_prev_in_ql' => 'Show content preview on mouseover in question lists',
);
......@@ -42,3 +42,4 @@ if (!defined('QA_VERSION')) { // don't allow this page to be requested directly
qa_register_plugin_layer('qa-mouseover-layer.php', 'Mouseover Layer');
qa_register_plugin_module('module', 'qa-mouseover-admin-form.php', 'qa_mouseover_admin_form', 'Mouseover Layer');
qa_register_plugin_phrases('qa-mouseover-lang-*.php', 'mouseover');
......@@ -41,3 +41,4 @@ if (!defined('QA_VERSION')) { // don't allow this page to be requested directly
qa_register_plugin_module('captcha', 'qa-recaptcha-captcha.php', 'qa_recaptcha_captcha', 'reCAPTCHA');
qa_register_plugin_phrases('qa-recaptcha-captcha-lang-*.php', 'recaptcha');
<?php
/*
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
Description: Language phrases for reCAPTCHA captcha module plugin
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
More about this license: http://www.question2answer.org/license.php
*/
return array(
'invalid_response' => 'The response parameter is invalid or malformed.',
'invalid_secret' => 'The secret parameter is invalid or malformed.',
'missing_response' => 'The response parameter is missing.',
'missing_secret' => 'The secret parameter is missing.',
'secret_key' => 'reCAPTCHA Secret key:',
'sign_up_to_get_keys' => 'To use reCAPTCHA, you must ^1sign up^2 to get these keys.',
'site_key' => 'reCAPTCHA Site key:',
);
......@@ -31,10 +31,10 @@ class qa_recaptcha_captcha
// human-readable error messages (though these are not currently displayed anywhere)
$this->errorCodeMessages = array(
'missing-input-secret' => 'The secret parameter is missing.',
'invalid-input-secret' => 'The secret parameter is invalid or malformed.',
'missing-input-response' => 'The response parameter is missing.',
'invalid-input-response' => 'The response parameter is invalid or malformed.',
'missing-input-secret' => qa_lang_html('recaptcha/missing_secret'),
'invalid-input-secret' => qa_lang_html('recaptcha/invalid_secret'),
'missing-input-response' => qa_lang_html('recaptcha/missing_response'),
'invalid-input-response' => qa_lang_html('recaptcha/invalid_response'),
);
}
......@@ -55,21 +55,24 @@ class qa_recaptcha_captcha
$error = null;
if (!strlen($pub) || !strlen($pri)) {
require_once $this->directory.'recaptchalib.php';
$error = 'To use reCAPTCHA, you must <a href="'.qa_html(ReCaptcha::getSignupUrl()).'" target="_blank">sign up</a> to get these keys.';
$error = strtr(qa_lang_html('recaptcha/sign_up_to_get_keys'), array(
'^1' => '<a href="'.qa_html(ReCaptcha::getSignupUrl()).'" target="_blank">',
'^2' => '</a>'
));
}
$form = array(
'ok' => $saved ? 'reCAPTCHA settings saved' : null,
'ok' => $saved ? qa_lang_html('admin/options_saved') : null,
'fields' => array(
'public' => array(
'label' => 'reCAPTCHA Site key:',
'label' => qa_lang_html('recaptcha/site_key'),
'value' => $pub,
'tags' => 'name="recaptcha_public_key_field"',
),
'private' => array(
'label' => 'reCAPTCHA Secret key:',
'label' => qa_lang_html('recaptcha/secret_key'),
'value' => $pri,
'tags' => 'name="recaptcha_private_key_field"',
'error' => $error,
......@@ -78,7 +81,7 @@ class qa_recaptcha_captcha
'buttons' => array(
array(
'label' => 'Save Changes',
'label' => qa_lang_html('main/save_button'),
'tags' => 'name="recaptcha_save_button"',
),
),
......
......@@ -41,3 +41,4 @@ if (!defined('QA_VERSION')) { // don't allow this page to be requested directly
qa_register_plugin_module('widget', 'qa-tag-cloud.php', 'qa_tag_cloud', 'Tag Cloud');
qa_register_plugin_phrases('qa-tag-cloud-lang-*.php', 'tag_cloud');
<?php
/*
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
Description: Language phrases for Tag cloud widget plugin
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
More about this license: http://www.question2answer.org/license.php
*/
return array(
'biggest_font_size' => 'Biggest font size:',
'font_size_tag_popularity' => 'Font size represents tag popularity',
'maximum_tags_to_show' => 'Maximum tags to show:',
'pixels'=> 'pixels',
'smallest_allowed_font_size' => 'Smallest allowed font size:',
'tags' => 'tags',
);
......@@ -49,35 +49,35 @@ class qa_tag_cloud
}
return array(
'ok' => $saved ? 'Tag cloud settings saved' : null,
'ok' => $saved ? qa_lang_html('admin/options_saved') : null,
'fields' => array(
array(
'label' => 'Maximum tags to show:',
'label' => qa_lang_html('tag_cloud/maximum_tags_to_show'),
'type' => 'number',
'value' => (int) qa_opt('tag_cloud_count_tags'),
'suffix' => 'tags',
'suffix' => qa_lang_html('tag_cloud/tags'),
'tags' => 'name="tag_cloud_count_tags_field"',
),
array(
'label' => 'Biggest font size:',
'suffix' => 'pixels',
'label' => qa_lang_html('tag_cloud/biggest_font_size'),
'suffix' => qa_lang_html('tag_cloud/pixels'),
'type' => 'number',
'value' => (int) qa_opt('tag_cloud_font_size'),
'tags' => 'name="tag_cloud_font_size_field"',
),
array(
'label' => 'Smallest allowed font size:',
'suffix' => 'pixels',
'label' => qa_lang_html('tag_cloud/smallest_allowed_font_size'),
'suffix' => qa_lang_html('tag_cloud/pixels'),
'type' => 'number',
'value' => (int) qa_opt('tag_cloud_minimal_font_size'),
'tags' => 'name="tag_cloud_minimal_font_size_field"',
),
array(
'label' => 'Font size represents tag popularity',
'label' => qa_lang_html('tag_cloud/font_size_tag_popularity'),
'type' => 'checkbox',
'value' => qa_opt('tag_cloud_size_popular'),
'tags' => 'name="tag_cloud_size_popular_field"',
......@@ -86,7 +86,7 @@ class qa_tag_cloud
'buttons' => array(
array(
'label' => 'Save Changes',
'label' => qa_lang_html('main/save_button'),
'tags' => 'name="tag_cloud_save_button"',
),
),
......
......@@ -43,4 +43,6 @@ if (!defined('QA_VERSION')) { // don't allow this page to be requested directly
qa_register_plugin_module('editor', 'qa-wysiwyg-editor.php', 'qa_wysiwyg_editor', 'WYSIWYG Editor');
qa_register_plugin_module('page', 'qa-wysiwyg-upload.php', 'qa_wysiwyg_upload', 'WYSIWYG Upload');
qa_register_plugin_phrases('qa-wysiwyg-lang-*.php', 'wysiwyg');
qa_register_plugin_module('page', 'qa-wysiwyg-ajax.php', 'qa_wysiwyg_ajax', 'WYSIWYG Editor AJAX handler');
......@@ -66,14 +66,14 @@ class qa_wysiwyg_editor
' var postsEdited = parseInt(response, 10);',
' var $btn = $("#wysiwyg_editor_ajax");',
' if (isNaN(postsEdited)) {',
' $btn.text("ERROR");',
' $btn.text(' . qa_js(qa_lang_html('wysiwyg/error')) . ');',
' }',
' else if (postsEdited < 5) {',
' $btn.text("All posts converted.");',
' $btn.text(' . qa_js(qa_lang_html('wysiwyg/all_posts_converted')) . ');',
' }',
' else {',
' totalEdited += postsEdited;',
' $btn.text("Updating posts... " + totalEdited)',
' $btn.text(' . qa_js(qa_lang_html('wysiwyg/updating_posts') . ' ') . ' + totalEdited)',
' window.setTimeout(function() {',
' wysiwyg_editor_ajax(totalEdited);',
' }, 1000);',
......@@ -87,16 +87,16 @@ class qa_wysiwyg_editor
' return false;',
'});',
);
$ajaxHtml = 'Update broken images from old CKeditor Smiley plugin: ' .
'<button id="wysiwyg_editor_ajax">click here</button> ' .
$ajaxHtml = qa_lang_html('wysiwyg/update_broken_images') . ' ' .
'<button id="wysiwyg_editor_ajax">' . qa_lang_html('wysiwyg/click_here') . '</button> ' .
'<script>' . implode("\n", $js) . '</script>';
return array(
'ok' => $saved ? 'WYSIWYG editor settings saved' : null,
'ok' => $saved ? qa_lang_html('admin/options_saved') : null,
'fields' => array(
array(
'label' => 'Allow images to be uploaded',
'label' => qa_lang_html('wysiwyg/allow_images'),
'type' => 'checkbox',
'value' => (int)qa_opt('wysiwyg_editor_upload_images'),
'tags' => 'name="wysiwyg_editor_upload_images_field" id="wysiwyg_editor_upload_images_field"',
......@@ -104,7 +104,7 @@ class qa_wysiwyg_editor
array(
'id' => 'wysiwyg_editor_upload_all_display',
'label' => 'Allow other content to be uploaded, e.g. Flash, PDF',
'label' => qa_lang_html('wysiwyg/allow_other_content'),
'type' => 'checkbox',
'value' => (int)qa_opt('wysiwyg_editor_upload_all'),
'tags' => 'name="wysiwyg_editor_upload_all_field"',
......@@ -112,8 +112,8 @@ class qa_wysiwyg_editor
array(
'id' => 'wysiwyg_editor_upload_max_size_display',
'label' => 'Maximum size of uploads:',
'suffix' => 'MB (max '.qa_html(number_format($this->bytes_to_mega(qa_get_max_upload_size()), 1)).')',
'label' => qa_lang_html('wysiwyg/maximum_size'),
'suffix' => qa_lang_html_sub('wysiwyg/mb_max_x', qa_html(number_format($this->bytes_to_mega(qa_get_max_upload_size()), 1))),
'type' => 'number',
'value' => qa_html(number_format($this->bytes_to_mega(qa_opt('wysiwyg_editor_upload_max_size')), 1)),
'tags' => 'name="wysiwyg_editor_upload_max_size_field"',
......@@ -127,7 +127,7 @@ class qa_wysiwyg_editor
'buttons' => array(
array(
'label' => 'Save Changes',
'label' => qa_lang_html('main/save_button'),
'tags' => 'name="wysiwyg_editor_save_button"',
),
),
......
<?php
/*
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
Description: Language phrases for WYSIWYG editor plugin
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
More about this license: http://www.question2answer.org/license.php
*/
return array(
'all_posts_converted' => 'All posts converted.',
'allow_images' => 'Allow images to be uploaded',
'allow_other_content' => 'Allow other content to be uploaded, e.g. Flash, PDF',
'characters' => 'characters',
'click_here' => 'click here',
'error' => 'ERROR',
'maximum_size' => 'Maximum size of uploads:',
'mb_max_x' => 'MB (max ^)',
'update_broken_images' => 'Update broken images from old CKeditor Smiley plugin:',
'updating_posts' => 'Updating posts...',
);
......@@ -41,3 +41,4 @@ if (!defined('QA_VERSION')) { // don't allow this page to be requested directly
qa_register_plugin_module('page', 'qa-xml-sitemap.php', 'qa_xml_sitemap', 'XML Sitemap');
qa_register_plugin_phrases('qa-xml-sitemap-lang-*.php', 'xml_sitemap');
<?php
/*
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
Description: Language phrases for XML sitemap plugin
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
More about this license: http://www.question2answer.org/license.php
*/
return array(
'include_cat_browser' => 'Include category browser',
'include_q_pages' => 'Include question pages',
'include_ql_category' => 'Include question list for each category',
'include_ql_tag' => 'Include question list for each tag',
'include_user_pages' => 'Include user pages',
'xml_sitemap' => 'XML Sitemap',
);
......@@ -59,11 +59,11 @@ class qa_xml_sitemap
}
$form = array(
'ok' => $saved ? 'XML sitemap settings saved' : null,
'ok' => $saved ? qa_lang_html('admin/options_saved') : null,
'fields' => array(
'questions' => array(
'label' => 'Include question pages',
'label' => qa_lang_html('xml_sitemap/include_q_pages'),
'type' => 'checkbox',
'value' => (int)qa_opt('xml_sitemap_show_questions'),
'tags' => 'name="xml_sitemap_show_questions_field"',
......@@ -72,7 +72,7 @@ class qa_xml_sitemap
'buttons' => array(
array(
'label' => 'Save Changes',
'label' => qa_lang_html('main/save_button'),
'tags' => 'name="xml_sitemap_save_button"',
),
),
......@@ -80,7 +80,7 @@ class qa_xml_sitemap
if (!QA_FINAL_EXTERNAL_USERS) {
$form['fields']['users'] = array(
'label' => 'Include user pages',
'label' => qa_lang_html('xml_sitemap/include_user_pages'),
'type' => 'checkbox',
'value' => (int)qa_opt('xml_sitemap_show_users'),
'tags' => 'name="xml_sitemap_show_users_field"',
......@@ -89,7 +89,7 @@ class qa_xml_sitemap
if (qa_using_tags()) {
$form['fields']['tagqs'] = array(
'label' => 'Include question list for each tag',
'label' => qa_lang_html('xml_sitemap/include_ql_tag'),
'type' => 'checkbox',
'value' => (int)qa_opt('xml_sitemap_show_tag_qs'),
'tags' => 'name="xml_sitemap_show_tag_qs_field"',
......@@ -98,14 +98,14 @@ class qa_xml_sitemap
if (qa_using_categories()) {
$form['fields']['categoryqs'] = array(
'label' => 'Include question list for each category',
'label' => qa_lang_html('xml_sitemap/include_ql_category'),
'type' => 'checkbox',
'value' => (int)qa_opt('xml_sitemap_show_category_qs'),
'tags' => 'name="xml_sitemap_show_category_qs_field"',
);
$form['fields']['categories'] = array(
'label' => 'Include category browser',
'label' => qa_lang_html('xml_sitemap/include_cat_browser'),
'type' => 'checkbox',
'value' => (int)qa_opt('xml_sitemap_show_categories'),
'tags' => 'name="xml_sitemap_show_categories_field"',
......@@ -120,7 +120,7 @@ class qa_xml_sitemap
{
return array(
array(
'title' => 'XML Sitemap',
'title' => qa_lang_html('xml_sitemap/xml_sitemap'),
'request' => 'sitemap.xml',
'nav' => null, // 'M'=main, 'F'=footer, 'B'=before main, 'O'=opposite main, null=none
),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment