Skip to content

Commit

Permalink
File chooser set up to open SVG files only. Changed label on load button
Browse files Browse the repository at this point in the history
  • Loading branch information
aumouvantsillage committed May 8, 2016
1 parent 6092602 commit ece57f0
Show file tree
Hide file tree
Showing 18 changed files with 181 additions and 90 deletions.
4 changes: 2 additions & 2 deletions js/backend/FileReader.js
Expand Up @@ -9,9 +9,9 @@ import {AbstractBackend, addBackend} from "./AbstractBackend";
export var FileReaderBackend = Object.create(AbstractBackend);

FileReaderBackend.init = function (container, _) {
AbstractBackend.init.call(this, container, "sozi-editor-backend-FileReader-input", _('Load local file (<i class="fa fa-warning"></i> read-only)'));
AbstractBackend.init.call(this, container, "sozi-editor-backend-FileReader-input", _('Load an SVG file from your computer (<i class="fa fa-warning"></i> read-only)'));

$(container).append('<input style="display:none;" id="sozi-editor-backend-FileReader-file" type="file">');
$(container).append('<input style="display:none;" id="sozi-editor-backend-FileReader-file" type="file" accept="image/svg+xml">');

$("#sozi-editor-backend-FileReader-input").click(this.openFileChooser.bind(this));

Expand Down
2 changes: 1 addition & 1 deletion js/backend/GoogleDrive.js
Expand Up @@ -13,7 +13,7 @@ GoogleDrive.clientId = "Your OAuth client Id";
GoogleDrive.apiKey = "Your developer API key";

GoogleDrive.init = function (container, _) {
AbstractBackend.init.call(this, container, "sozi-editor-backend-GoogleDrive-input", _("Load from Google Drive"));
AbstractBackend.init.call(this, container, "sozi-editor-backend-GoogleDrive-input", _("Load an SVG file from Google Drive"));

$(window).blur(this.doAutosave.bind(this));

Expand Down
4 changes: 2 additions & 2 deletions js/backend/NodeWebkit.js
Expand Up @@ -25,11 +25,11 @@ console.log("Current working dir: " + cwd);
export var NodeWebkit = Object.create(AbstractBackend);

NodeWebkit.init = function (container, _) {
AbstractBackend.init.call(this, container, "sozi-editor-backend-NodeWebkit-input", _("Load local file"));
AbstractBackend.init.call(this, container, "sozi-editor-backend-NodeWebkit-input", _("Load an SVG file from your computer"));

this.loadConfiguration();

$(container).append('<input style="display:none;" id="sozi-editor-backend-NodeWebkit-file" type="file">');
$(container).append('<input style="display:none;" id="sozi-editor-backend-NodeWebkit-file" type="file" accept="image/svg+xml">');

$("#sozi-editor-backend-NodeWebkit-input").click(this.openFileChooser.bind(this));

Expand Down
17 changes: 12 additions & 5 deletions locales/bg.po
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sozi\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2016-02-13 05:24:+0000\n"
"POT-Creation-Date: 2016-05-08 11:59:+0000\n"
"PO-Revision-Date: 2016-02-13 18:30+0100\n"
"Last-Translator: Guillaume Savaton <senshuapash@gmail.com>\n"
"Language-Team: Bulgarian <bg@li.org>\n"
Expand Down Expand Up @@ -39,16 +39,20 @@ msgid "Saved %s."
msgstr "Запазен %s."

#: build/js/backend/FileReader.js:19
msgid "Load local file (<i class=\"fa fa-warning\"></i> read-only)"
#, fuzzy
msgid ""
"Load an SVG file from your computer (<i class=\"fa fa-warning\"></i> read-"
"only)"
msgstr "Зареди локален файл (<i class=\"fa fa-warning\"></i> read-only)"

#: build/js/backend/GoogleDrive.js:21
msgid "Load from Google Drive"
#, fuzzy
msgid "Load an SVG file from Google Drive"
msgstr "Зареди от Google Диск"

#: build/js/backend/NodeWebkit.js:55
msgid "Load local file"
msgstr "Зареди локален файл"
msgid "Load an SVG file from your computer"
msgstr ""

#: build/js/backend/NodeWebkit.js:95
msgid "File not found: %s."
Expand Down Expand Up @@ -220,3 +224,6 @@ msgstr "Презареди SVG документа (F5)"
#: build/js/view/Toolbar.js:130
msgid "Information"
msgstr "Информация"

#~ msgid "Load local file"
#~ msgstr "Зареди локален файл"
17 changes: 12 additions & 5 deletions locales/da.po
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sozi\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2016-02-13 05:24:+0000\n"
"POT-Creation-Date: 2016-05-08 11:59:+0000\n"
"PO-Revision-Date: 2016-02-13 18:39+0100\n"
"Last-Translator: Guillaume Savaton <senshuapash@gmail.com>\n"
"Language-Team: Danish <da@li.org>\n"
Expand Down Expand Up @@ -39,16 +39,20 @@ msgid "Saved %s."
msgstr "Gemte %s"

#: build/js/backend/FileReader.js:19
msgid "Load local file (<i class=\"fa fa-warning\"></i> read-only)"
#, fuzzy
msgid ""
"Load an SVG file from your computer (<i class=\"fa fa-warning\"></i> read-"
"only)"
msgstr "Hent den lokale fil (<i class=\"fa fa-warning\"></i> som read-only)"

#: build/js/backend/GoogleDrive.js:21
msgid "Load from Google Drive"
#, fuzzy
msgid "Load an SVG file from Google Drive"
msgstr "Hent fra Google Drive"

#: build/js/backend/NodeWebkit.js:55
msgid "Load local file"
msgstr "Hent lokal fil"
msgid "Load an SVG file from your computer"
msgstr ""

#: build/js/backend/NodeWebkit.js:95
msgid "File not found: %s."
Expand Down Expand Up @@ -217,3 +221,6 @@ msgstr "Genindlæs SVG-dokument (F5)"
#: build/js/view/Toolbar.js:130
msgid "Information"
msgstr "Oplysninger"

#~ msgid "Load local file"
#~ msgstr "Hent lokal fil"
17 changes: 12 additions & 5 deletions locales/de.po
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sozi\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2016-02-13 05:24:+0000\n"
"POT-Creation-Date: 2016-05-08 11:59:+0000\n"
"PO-Revision-Date: 2016-02-13 18:37+0100\n"
"Last-Translator: Guillaume Savaton <senshuapash@gmail.com>\n"
"Language-Team: German <de@li.org>\n"
Expand Down Expand Up @@ -39,16 +39,20 @@ msgid "Saved %s."
msgstr "%s gespeichert."

#: build/js/backend/FileReader.js:19
msgid "Load local file (<i class=\"fa fa-warning\"></i> read-only)"
#, fuzzy
msgid ""
"Load an SVG file from your computer (<i class=\"fa fa-warning\"></i> read-"
"only)"
msgstr "Lade lokale Datei (<i class=\"fa fa-warning\"></i> schreibgeschützt)"

#: build/js/backend/GoogleDrive.js:21
msgid "Load from Google Drive"
#, fuzzy
msgid "Load an SVG file from Google Drive"
msgstr "Von Google Drive laden"

#: build/js/backend/NodeWebkit.js:55
msgid "Load local file"
msgstr "Lokale Datei laden"
msgid "Load an SVG file from your computer"
msgstr ""

#: build/js/backend/NodeWebkit.js:95
msgid "File not found: %s."
Expand Down Expand Up @@ -220,3 +224,6 @@ msgstr "SVG-Dokument neu laden (F5)"
#: build/js/view/Toolbar.js:130
msgid "Information"
msgstr "Information"

#~ msgid "Load local file"
#~ msgstr "Lokale Datei laden"
23 changes: 15 additions & 8 deletions locales/eo.po
Expand Up @@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: sozi\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2016-02-13 05:24:+0000\n"
"PO-Revision-Date: 2016-02-13 18:39+0100\n"
"POT-Creation-Date: 2016-05-08 11:59:+0000\n"
"PO-Revision-Date: 2016-05-08 14:09+0100\n"
"Last-Translator: Guillaume Savaton <senshuapash@gmail.com>\n"
"Language-Team: Esperanto <eo@li.org>\n"
"Language: eo\n"
Expand Down Expand Up @@ -39,16 +39,20 @@ msgid "Saved %s."
msgstr "Konservis %s."

#: build/js/backend/FileReader.js:19
msgid "Load local file (<i class=\"fa fa-warning\"></i> read-only)"
msgstr "Malfermi lokan dosieron (<i class=\"fa fa-warning\"></i> nurlege)"
msgid ""
"Load an SVG file from your computer (<i class=\"fa fa-warning\"></i> read-"
"only)"
msgstr ""
"Malfermi SVG dosieron el via komputilo (<i class=\"fa fa-warning\"></i> "
"nurlege)"

#: build/js/backend/GoogleDrive.js:21
msgid "Load from Google Drive"
msgstr "Malfermi el Google Drive"
msgid "Load an SVG file from Google Drive"
msgstr "Malfermi SVG dosieron el Google Drive"

#: build/js/backend/NodeWebkit.js:55
msgid "Load local file"
msgstr "Malfermi lokan dosieron"
msgid "Load an SVG file from your computer"
msgstr "Malfermi SVG dosieron el via komputilo"

#: build/js/backend/NodeWebkit.js:95
msgid "File not found: %s."
Expand Down Expand Up @@ -220,3 +224,6 @@ msgstr "Reŝargi la SVG-dokumenton (F5)"
#: build/js/view/Toolbar.js:130
msgid "Information"
msgstr "Informoj"

#~ msgid "Load local file"
#~ msgstr "Malfermi lokan dosieron"
19 changes: 13 additions & 6 deletions locales/es.po
Expand Up @@ -7,16 +7,16 @@ msgid ""
msgstr ""
"Project-Id-Version: sozi\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2016-02-13 05:24:+0000\n"
"POT-Creation-Date: 2016-05-08 11:59:+0000\n"
"PO-Revision-Date: 2016-02-13 18:42+0100\n"
"Last-Translator: Guillaume Savaton <senshuapash@gmail.com>\n"
"Language-Team: Vaslibre <info@vaslibre.org.ve>\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2015-11-12 19:08+0000\n"
"X-Generator: Poedit 1.5.4\n"
"Language: es\n"

#: build/js/Storage.js:85
msgid "File %s could not be loaded."
Expand All @@ -39,17 +39,21 @@ msgid "Saved %s."
msgstr "%s guardado."

#: build/js/backend/FileReader.js:19
msgid "Load local file (<i class=\"fa fa-warning\"></i> read-only)"
#, fuzzy
msgid ""
"Load an SVG file from your computer (<i class=\"fa fa-warning\"></i> read-"
"only)"
msgstr ""
"Cargar archivo local (<i class=\"fa fa-warning\"></i> sólo para lectura)"

#: build/js/backend/GoogleDrive.js:21
msgid "Load from Google Drive"
#, fuzzy
msgid "Load an SVG file from Google Drive"
msgstr "Importar desde Google Drive"

#: build/js/backend/NodeWebkit.js:55
msgid "Load local file"
msgstr "Cargar un archivo local"
msgid "Load an SVG file from your computer"
msgstr ""

#: build/js/backend/NodeWebkit.js:95
msgid "File not found: %s."
Expand Down Expand Up @@ -219,3 +223,6 @@ msgstr "Volver a cargar el documento SVG (F5)"
#: build/js/view/Toolbar.js:130
msgid "Information"
msgstr "Información"

#~ msgid "Load local file"
#~ msgstr "Cargar un archivo local"
22 changes: 14 additions & 8 deletions locales/fr.po
@@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: Sozi 15.04\n"
"POT-Creation-Date: 2016-02-13 05:24:+0000\n"
"PO-Revision-Date: 2016-02-13 18:49+0100\n"
"POT-Creation-Date: 2016-05-08 11:59:+0000\n"
"PO-Revision-Date: 2016-05-08 14:08+0100\n"
"Last-Translator: Guillaume Savaton <senshuapash@gmail.com>\n"
"Language-Team: Sozi translators\n"
"Language: fr\n"
Expand Down Expand Up @@ -34,17 +34,20 @@ msgid "Saved %s."
msgstr "Fichier %s enregistré."

#: build/js/backend/FileReader.js:19
msgid "Load local file (<i class=\"fa fa-warning\"></i> read-only)"
msgid ""
"Load an SVG file from your computer (<i class=\"fa fa-warning\"></i> read-"
"only)"
msgstr ""
"Charger un fichier local (<i class=\"fa fa-warning\"></i> en lecture seule)"
"Charger un document SVG depuis votre ordinateur (<i class=\"fa fa-warning"
"\"></i> en lecture seule)"

#: build/js/backend/GoogleDrive.js:21
msgid "Load from Google Drive"
msgstr "Charger depuis Google Drive"
msgid "Load an SVG file from Google Drive"
msgstr "Charger un document SVG depuis Google Drive"

#: build/js/backend/NodeWebkit.js:55
msgid "Load local file"
msgstr "Charger un fichier local"
msgid "Load an SVG file from your computer"
msgstr "Charger un document SVG depuis votre ordinateur"

#: build/js/backend/NodeWebkit.js:95
msgid "File not found: %s."
Expand Down Expand Up @@ -219,6 +222,9 @@ msgstr "Recharger le document SVG (F5)"
msgid "Information"
msgstr "Information"

#~ msgid "Load local file"
#~ msgstr "Charger un fichier local"

#~ msgid "Undo"
#~ msgstr "Annuler"

Expand Down
17 changes: 12 additions & 5 deletions locales/gl.po
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sozi\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2016-02-13 05:24:+0000\n"
"POT-Creation-Date: 2016-05-08 11:59:+0000\n"
"PO-Revision-Date: 2016-02-13 18:50+0100\n"
"Last-Translator: Guillaume Savaton <senshuapash@gmail.com>\n"
"Language-Team: Galician <gl@li.org>\n"
Expand Down Expand Up @@ -39,17 +39,21 @@ msgid "Saved %s."
msgstr "%s gardado."

#: build/js/backend/FileReader.js:19
msgid "Load local file (<i class=\"fa fa-warning\"></i> read-only)"
#, fuzzy
msgid ""
"Load an SVG file from your computer (<i class=\"fa fa-warning\"></i> read-"
"only)"
msgstr ""
"Cargar un ficheiro local (<i class=\"fa fa-warning\"></i> só para lectura)"

#: build/js/backend/GoogleDrive.js:21
msgid "Load from Google Drive"
#, fuzzy
msgid "Load an SVG file from Google Drive"
msgstr "Importar do Google Drive"

#: build/js/backend/NodeWebkit.js:55
msgid "Load local file"
msgstr "Cargar un ficheiro local"
msgid "Load an SVG file from your computer"
msgstr ""

#: build/js/backend/NodeWebkit.js:95
msgid "File not found: %s."
Expand Down Expand Up @@ -219,3 +223,6 @@ msgstr "Volver cargar o documento SVG (F5)"
#: build/js/view/Toolbar.js:130
msgid "Information"
msgstr "Información"

#~ msgid "Load local file"
#~ msgstr "Cargar un ficheiro local"

0 comments on commit ece57f0

Please sign in to comment.