Robert Vogel has uploaded a new change for review. https://gerrit.wikimedia.org/r/201136
Change subject: PageAccess: I18N fixes from translatewiki ...................................................................... PageAccess: I18N fixes from translatewiki This is a follow up commit of I51bfa9c6c1cda0382fe60379712e4a7996e00c1d [1] It applies the changes from legacy .i18n.php file to the json i18n file and creates shim. [1] https://gerrit.wikimedia.org/r/#/c/199254/1 Change-Id: I6805551d9b9b851d8e0b5d20b17a4b1950ce13e3 --- M PageAccess/PageAccess.i18n.php M PageAccess/i18n/en.json 2 files changed, 29 insertions(+), 44 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions refs/changes/36/201136/1 diff --git a/PageAccess/PageAccess.i18n.php b/PageAccess/PageAccess.i18n.php index e9cf848..5836d12 100644 --- a/PageAccess/PageAccess.i18n.php +++ b/PageAccess/PageAccess.i18n.php @@ -1,50 +1,35 @@ <?php /** - * Internationalisation file for PageAccess + * This is a backwards-compatibility shim, generated by: + * https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php * - * Part of BlueSpice for MediaWiki + * Beginning with MediaWiki 1.23, translation strings are stored in json files, + * and the EXTENSION.i18n.php file only exists to provide compatibility with + * older releases of MediaWiki. For more information about this migration, see: + * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format * - * @author Marc Reymann <reym...@hallowelt.biz> - * @author Stephan Muggli <mug...@hallowelt.biz> - * @package BlueSpice_Extensions - * @subpackage CountThings - * @copyright Copyright (C) 2012 Hallo Welt! - Medienwerkstatt GmbH, All rights reserved. - * @license http://www.gnu.org/copyleft/gpl.html GNU Public License v2 or later - * @filesource + * This shim maintains compatibility back to MediaWiki 1.17. */ - $messages = array(); +if ( !function_exists( 'wfJsonI18nShimb8d8bcdc73ff1bd7' ) ) { + function wfJsonI18nShimb8d8bcdc73ff1bd7( $cache, $code, &$cachedData ) { + $codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] ); + foreach ( $codeSequence as $csCode ) { + $fileName = dirname( __FILE__ ) . "/i18n//$csCode.json"; + if ( is_readable( $fileName ) ) { + $data = FormatJson::decode( file_get_contents( $fileName ), true ); + foreach ( array_keys( $data ) as $key ) { + if ( $key === '' || $key[0] === '@' ) { + unset( $data[$key] ); + } + } + $cachedData['messages'] = array_merge( $data, $cachedData['messages'] ); + } -$messages['de'] = array( - 'bs-pageaccess-desc' => 'Regelt den Zugriff auf Seitenebene.', - 'bs-pageaccess-error-no-groups-given' => 'Es wurden keine Gruppen angegeben.', - 'bs-pageaccess-error-not-member-of-given-groups' => 'Du bist nicht Mitglied der angegebenen Gruppen. Um zu verhindern, dass Du dich aus der Seite aussperrst, wurde das Speichern deaktiviert.', - 'bs-pageaccess-error-included-forbidden-template' => 'Du hast das Template "$1" eingebunden, auf das du keine Leseberechtigung hast. Um zu verhindern, dass Du dich aus der Seite aussperrst, wurde das Speichern deaktiviert.', - 'bs-pageaccess-tag-groups-desc' => 'Gib die Gruppen an, die exklusiven Zugriff auf die Seite erhalten sollen. Mehrere Gruppen können durch Kommata getrennt werden.', - 'pageaccess' => 'Durch Page Access geschützte Seiten' -); + $cachedData['deps'][] = new FileDependency( $fileName ); + } + return true; + } -$messages['de-formal'] = array( - 'bs-pageaccess-error-not-member-of-given-groups' => 'Sie sind nicht Mitglied der angegebenen Gruppen. Um zu verhindern, dass Sie sich aus der Seite aussperren, wurde das Speichern deaktiviert.', - 'bs-pageaccess-error-included-forbidden-template' => 'Sie haben das Template "$1" eingebunden, auf das Sie keine Leseberechtigung haben. Um zu verhindern, dass Sie sich aus der Seite aussperren, wurde das Speichern deaktiviert.', - 'bs-pageaccess-tag-groups-desc' => 'Geben Sie die Gruppen an, die exklusiven Zugriff auf die Seite erhalten sollen. Mehrere Gruppen können durch Kommata getrennt werden.', - 'pageaccess' => 'Durch PageAccess geschützte Seiten' -); - -$messages['en'] = array( - 'bs-pageaccess-desc' => 'Controls access on page level.', - 'bs-pageaccess-error-no-groups-given' => 'No groups were specified.', - 'bs-pageaccess-error-not-member-of-given-groups' => 'You are not a member of the given groups. In order to prevent you from locking yourself out, saving was disabled.', - 'bs-pageaccess-error-included-forbidden-template' => 'You have tried to use the template "$1" to which you do not have read access. In order to prevent you from locking yourself out, saving was disabled.', - 'bs-pageaccess-tag-groups-desc' => 'Specify the groups that should have exclusive access to this page. Multiple groups can be separated by commas.', - 'pageaccess' => 'Pages secured by PageAccess' -); - -$messages['qqq'] = array( - 'bs-pageaccess-desc' => 'Controls access on page level.', - 'bs-pageaccess-error-no-groups-given' => 'No groups were specified.', - 'bs-pageaccess-error-not-member-of-given-groups' => 'You\'re not a member of the given groups. In order to prevent you from locking yourself out, saving was disabled.', - 'bs-pageaccess-error-included-forbidden-template' => 'You\'ve tried to use the template "$1" to which you don\'t have read access. In order to prevent you from locking yourself out, saving was disabled.', - 'bs-pageaccess-tag-groups-desc' => 'Specify the groups that should have exclusive access to this page. Multiple groups can be separated by commas.', - 'pageaccess' => 'Pages secured by PageAccess' -); + $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 'wfJsonI18nShimb8d8bcdc73ff1bd7'; +} diff --git a/PageAccess/i18n/en.json b/PageAccess/i18n/en.json index 0e0ffa5..67b340b 100644 --- a/PageAccess/i18n/en.json +++ b/PageAccess/i18n/en.json @@ -7,8 +7,8 @@ }, "bs-pageaccess-desc": "Controls access on page level", "bs-pageaccess-error-no-groups-given": "No groups were specified.", - "bs-pageaccess-error-not-member-of-given-groups": "You're not a member of the given groups. In order to prevent you from locking yourself out, saving was disabled.", - "bs-pageaccess-error-included-forbidden-template": "You've tried to use the template \"$1\" to which you don't have read access. In order to prevent you from locking yourself out, saving was disabled.", + "bs-pageaccess-error-not-member-of-given-groups": "You are not a member of the given groups. In order to prevent you from locking yourself out, saving was disabled.", + "bs-pageaccess-error-included-forbidden-template": "You have tried to use the template "$1" to which you do not have read access. In order to prevent you from locking yourself out, saving was disabled.", "bs-pageaccess-tag-groups-desc": "Specify the groups that should have exclusive access to this page. Multiple groups can be separated by commas.", "pageaccess": "Pages secured by PageAccess" } -- To view, visit https://gerrit.wikimedia.org/r/201136 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6805551d9b9b851d8e0b5d20b17a4b1950ce13e3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions Gerrit-Branch: master Gerrit-Owner: Robert Vogel <vo...@hallowelt.biz> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits