From 2d1ee8848cf251dbc42ec99da2d508bb23d4d531 Mon Sep 17 00:00:00 2001 From: Charles du Jeu Date: Sun, 7 Jul 2013 20:59:14 +0200 Subject: [PATCH] Update strings in etherpad. --- .../editor.etherpad/class.EtherpadClient.php | 29 ++++++++++++++-- .../editor.etherpad/class.EtherpadLauncher.js | 6 ++-- core/src/plugins/editor.etherpad/i18n/en.php | 30 +++++++++++++++-- core/src/plugins/editor.etherpad/i18n/fr.php | 33 +++++++++++++++++++ core/src/plugins/editor.etherpad/manifest.xml | 8 +++-- 5 files changed, 97 insertions(+), 9 deletions(-) create mode 100755 core/src/plugins/editor.etherpad/i18n/fr.php diff --git a/core/src/plugins/editor.etherpad/class.EtherpadClient.php b/core/src/plugins/editor.etherpad/class.EtherpadClient.php index af9e8e3fc1..c68fdb2af2 100644 --- a/core/src/plugins/editor.etherpad/class.EtherpadClient.php +++ b/core/src/plugins/editor.etherpad/class.EtherpadClient.php @@ -1,11 +1,36 @@ + * This file is part of AjaXplorer. + * + * AjaXplorer is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AjaXplorer 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 Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with AjaXplorer. If not, see . + * + * The latest code can be found at . + */ + +defined('AJXP_EXEC') or die( 'Access not allowed'); class EtherpadClient extends AJXP_Plugin{ - var $baseURL = "http://10.211.55.3:9001"; + var $baseURL = "http://localhost:9001"; + var $apiKey = ""; public function switchAction($actionName, $httpVars, $fileVars){ + $this->baseURL = rtrim($this->pluginConf["ETHERPAD_SERVER"], "/"); + $this->apiKey = $this->pluginConf["ETHERPAD_APIKEY"]; + if(isSet($httpVars["file"])){ $repository = ConfService::getRepository(); @@ -23,7 +48,7 @@ public function switchAction($actionName, $httpVars, $fileVars){ } require_once("etherpad-client/etherpad-lite-client.php"); - $client = new EtherpadLiteClient("nl8VJIWXZMHNj7aWj6rWy4CLct1mu97v",$this->baseURL."/api"); + $client = new EtherpadLiteClient($this->apiKey,$this->baseURL."/api"); $userName = AuthService::getLoggedUser()->getId(); $res = $client->createAuthorIfNotExistsFor($userName, $userName); $authorID = $res->authorID; diff --git a/core/src/plugins/editor.etherpad/class.EtherpadLauncher.js b/core/src/plugins/editor.etherpad/class.EtherpadLauncher.js index c6879e2458..88446c0766 100644 --- a/core/src/plugins/editor.etherpad/class.EtherpadLauncher.js +++ b/core/src/plugins/editor.etherpad/class.EtherpadLauncher.js @@ -67,14 +67,14 @@ Class.create("EtherpadLauncher", AbstractEditor, { files.push(label); } }); - selector.insert(new Element('optgroup',{label:'Free boards'})); + selector.insert(new Element('optgroup',{label:MessageHash['etherpad.5']})); frees.each(function(e){ selector.insert(new Element('option', {value:e}).update(e.replace('FREEPAD__', ''))); }); - selector.insert(new Element('option', {value:-1}).update('Create new pad')); + selector.insert(new Element('option', {value:-1}).update(MessageHash['etherpad.9'])); if(files.size()){ - selector.insert(new Element('optgroup', {label:'Files'})); + selector.insert(new Element('optgroup', {label:MessageHash['etherpad.6']})); files.each(function(e){ selector.insert(new Element('option', {value:e}).update(e)); }); diff --git a/core/src/plugins/editor.etherpad/i18n/en.php b/core/src/plugins/editor.etherpad/i18n/en.php index 9d3aabe9d4..1aa3979657 100644 --- a/core/src/plugins/editor.etherpad/i18n/en.php +++ b/core/src/plugins/editor.etherpad/i18n/en.php @@ -1,7 +1,33 @@ + * This file is part of AjaXplorer. + * + * AjaXplorer is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AjaXplorer 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 Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with AjaXplorer. If not, see . + * + * The latest code can be found at . + */ + $mess = array( "1" => "Collaboration board", - "1b"=> "Create an empty collaboration pad", + "1b"=> "Create or join an empty collaboration pad", "2" => "Collaborative Editor", - "3" => "Real-time collaborative edition" + "3" => "Real-time collaborative edition", + "4" => "Join an existing board or create a new one: ", + "5" => "Free boards", + "6" => "Files", + "7" => "Join", + "8" => "Board name", + "9" => "Create new board", ); \ No newline at end of file diff --git a/core/src/plugins/editor.etherpad/i18n/fr.php b/core/src/plugins/editor.etherpad/i18n/fr.php new file mode 100755 index 0000000000..72a61fe75f --- /dev/null +++ b/core/src/plugins/editor.etherpad/i18n/fr.php @@ -0,0 +1,33 @@ + + * This file is part of AjaXplorer. + * + * AjaXplorer is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AjaXplorer 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 Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with AjaXplorer. If not, see . + * + * The latest code can be found at . + */ + +$mess = array( + "1" => "Ardoise de Collaboration", + "1b"=> "Créer ou rejoindre une ardoise", + "2" => "Edition collaborative", + "3" => "Edition collaborative en temps en réel", + "4" => "Rejoindre une ardoise de collaboration, ou en créer une nouvelle", + "5" => "Ardoises libres", + "6" => "Fichiers", + "7" => "Rejoindre", + "8" => "Nom de l'ardoise", + "9" => "Créer une nouvelle ardoise", +); \ No newline at end of file diff --git a/core/src/plugins/editor.etherpad/manifest.xml b/core/src/plugins/editor.etherpad/manifest.xml index 09c309c870..9e6cd3e324 100644 --- a/core/src/plugins/editor.etherpad/manifest.xml +++ b/core/src/plugins/editor.etherpad/manifest.xml @@ -9,6 +9,10 @@ + + + +
@@ -42,8 +46,8 @@
- Join an existing board or create a new one: - Join + AJXP_MESSAGE[etherpad.4] + AJXP_MESSAGE[etherpad.7]