Now able to insert the contents of a file

This commit is contained in:
Pierre Pronchery 2011-10-25 13:14:34 +00:00
parent 562f6d7584
commit 1ef93cf3e5
8 changed files with 369 additions and 211 deletions

106
po/de.po
View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Editor 0.1.1\n" "Project-Id-Version: Editor 0.1.1\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-10-25 13:16+0200\n" "POT-Creation-Date: 2011-10-25 15:13+0200\n"
"PO-Revision-Date: 2010-04-07 22:05+0200\n" "PO-Revision-Date: 2010-04-07 22:05+0200\n"
"Last-Translator: Pierre Pronchery <khorben@defora.org>\n" "Last-Translator: Pierre Pronchery <khorben@defora.org>\n"
"Language-Team: German\n" "Language-Team: German\n"
@ -73,167 +73,179 @@ msgid "_Preferences"
msgstr "_Einstellungen" msgstr "_Einstellungen"
#: ../src/editor.c:138 #: ../src/editor.c:138
msgid "_File..."
msgstr "_Datei..."
#: ../src/editor.c:144
msgid "_About" msgid "_About"
msgstr "_Info" msgstr "_Info"
#: ../src/editor.c:149 #: ../src/editor.c:155
msgid "_File" msgid "_File"
msgstr "_Datei" msgstr "_Datei"
#: ../src/editor.c:150 #: ../src/editor.c:156
msgid "_Edit" msgid "_Edit"
msgstr "_Bearbeitung" msgstr "_Bearbeitung"
#: ../src/editor.c:151 #: ../src/editor.c:157
msgid "_Insert"
msgstr ""
#: ../src/editor.c:158
msgid "_Help" msgid "_Help"
msgstr "_Hilfe" msgstr "_Hilfe"
#: ../src/editor.c:158 #: ../src/editor.c:165
msgid "New" msgid "New"
msgstr "" msgstr ""
#: ../src/editor.c:159 #: ../src/editor.c:166
msgid "Open" msgid "Open"
msgstr "" msgstr ""
#: ../src/editor.c:161 #: ../src/editor.c:168
msgid "Save" msgid "Save"
msgstr "" msgstr ""
#: ../src/editor.c:162 #: ../src/editor.c:169
msgid "Save as" msgid "Save as"
msgstr "" msgstr ""
#: ../src/editor.c:165 #: ../src/editor.c:172
msgid "Cut" msgid "Cut"
msgstr "" msgstr ""
#: ../src/editor.c:166 #: ../src/editor.c:173
msgid "Copy" msgid "Copy"
msgstr "" msgstr ""
#: ../src/editor.c:167 #: ../src/editor.c:174
msgid "Paste" msgid "Paste"
msgstr "" msgstr ""
#: ../src/editor.c:170 #: ../src/editor.c:177
msgid "Preferences" msgid "Preferences"
msgstr "Einstellungen" msgstr "Einstellungen"
#: ../src/editor.c:182 #: ../src/editor.c:189
msgid "none" msgid "none"
msgstr "" msgstr ""
#: ../src/editor.c:183 #: ../src/editor.c:190
msgid "characters" msgid "characters"
msgstr "" msgstr ""
#: ../src/editor.c:184 #: ../src/editor.c:191
msgid "words" msgid "words"
msgstr "" msgstr ""
#: ../src/editor.c:185 #: ../src/editor.c:192
msgid "words then characters" msgid "words then characters"
msgstr "" msgstr ""
#: ../src/editor.c:268 #: ../src/editor.c:275
msgid "Text editor - " msgid "Text editor - "
msgstr "" msgstr ""
#: ../src/editor.c:269 #: ../src/editor.c:276
msgid "(Untitled)" msgid "(Untitled)"
msgstr "" msgstr ""
#: ../src/editor.c:382 #: ../src/editor.c:389
msgid "translator-credits" msgid "translator-credits"
msgstr "Pierre Pronchery <khorben@defora.org>" msgstr "Pierre Pronchery <khorben@defora.org>"
#: ../src/editor.c:418 #: ../src/editor.c:425
msgid "Could not save configuration" msgid "Could not save configuration"
msgstr "" msgstr ""
#: ../src/editor.c:432 ../src/editor.c:437 #: ../src/editor.c:439 ../src/editor.c:444
msgid "Error" msgid "Error"
msgstr "Fehler" msgstr "Fehler"
#: ../src/editor.c:464 ../src/editor.c:474 ../src/editor.c:616 #: ../src/editor.c:471 ../src/editor.c:481 ../src/editor.c:709
#: ../src/editor.c:630 ../src/editor.c:779 ../src/editor.c:784 #: ../src/editor.c:723 ../src/editor.c:876 ../src/editor.c:881
msgid "Warning" msgid "Warning"
msgstr "Achtung" msgstr "Achtung"
#: ../src/editor.c:468 #: ../src/editor.c:475
msgid "" msgid ""
"There are unsaved changes.\n" "There are unsaved changes.\n"
"Discard or save them?" "Discard or save them?"
msgstr "" msgstr ""
#: ../src/editor.c:532 #: ../src/editor.c:539
msgid "Find text" msgid "Find text"
msgstr "" msgstr ""
#: ../src/editor.c:543 #: ../src/editor.c:550
msgid "Text:" msgid "Text:"
msgstr "Text:" msgstr "Text:"
#: ../src/editor.c:550 #: ../src/editor.c:557
msgid "Case-sensitive" msgid "Case-sensitive"
msgstr "" msgstr ""
#: ../src/editor.c:552 #: ../src/editor.c:559
msgid "Wrap" msgid "Wrap"
msgstr "" msgstr ""
#: ../src/editor.c:575 #: ../src/editor.c:582
msgid "Text not found" msgid "Text not found"
msgstr "" msgstr ""
#: ../src/editor.c:620 #: ../src/editor.c:661
msgid "Insert file..."
msgstr ""
#: ../src/editor.c:667 ../src/editor.c:790
msgid "Text files"
msgstr ""
#: ../src/editor.c:671 ../src/editor.c:794
msgid "All files"
msgstr ""
#: ../src/editor.c:713
msgid "" msgid ""
"There are unsaved changes.\n" "There are unsaved changes.\n"
"Are you sure you want to discard them?" "Are you sure you want to discard them?"
msgstr "" msgstr ""
#: ../src/editor.c:627 #: ../src/editor.c:720
msgid "Discard" msgid "Discard"
msgstr "" msgstr ""
#: ../src/editor.c:687 #: ../src/editor.c:784
msgid "Open file..." msgid "Open file..."
msgstr "Offnen..." msgstr "Offnen..."
#: ../src/editor.c:693 #: ../src/editor.c:852
msgid "Text files"
msgstr ""
#: ../src/editor.c:697
msgid "All files"
msgstr ""
#: ../src/editor.c:755
msgid "Partial write" msgid "Partial write"
msgstr "" msgstr ""
#: ../src/editor.c:783 #: ../src/editor.c:880
msgid "This file already exists. Overwrite?" msgid "This file already exists. Overwrite?"
msgstr "" msgstr ""
#: ../src/editor.c:792 #: ../src/editor.c:889
msgid "Allocation error" msgid "Allocation error"
msgstr "" msgstr ""
#: ../src/editor.c:807 #: ../src/editor.c:904
msgid "Save as..." msgid "Save as..."
msgstr "" msgstr ""
#: ../src/editor.c:864 #: ../src/editor.c:961
msgid "Text editor preferences" msgid "Text editor preferences"
msgstr "Text Editor Einstellungen" msgstr "Text Editor Einstellungen"
#: ../src/editor.c:881 #: ../src/editor.c:978
msgid "Font:" msgid "Font:"
msgstr "" msgstr ""
#: ../src/editor.c:891 #: ../src/editor.c:988
msgid "Wrap mode:" msgid "Wrap mode:"
msgstr "" msgstr ""

124
po/es.po
View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Editor 0.1.1\n" "Project-Id-Version: Editor 0.1.1\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-10-25 13:16+0200\n" "POT-Creation-Date: 2011-10-25 15:13+0200\n"
"PO-Revision-Date: 2010-04-07 22:07+0200\n" "PO-Revision-Date: 2010-04-07 22:07+0200\n"
"Last-Translator: Pierre Pronchery <khorben@defora.org>\n" "Last-Translator: Pierre Pronchery <khorben@defora.org>\n"
"Language-Team: Spanish\n" "Language-Team: Spanish\n"
@ -73,167 +73,179 @@ msgid "_Preferences"
msgstr "_Preferencias" msgstr "_Preferencias"
#: ../src/editor.c:138 #: ../src/editor.c:138
msgid "_File..."
msgstr ""
#: ../src/editor.c:144
msgid "_About" msgid "_About"
msgstr "" msgstr ""
#: ../src/editor.c:149 #: ../src/editor.c:155
msgid "_File" msgid "_File"
msgstr "" msgstr ""
#: ../src/editor.c:150 #: ../src/editor.c:156
msgid "_Edit" msgid "_Edit"
msgstr "" msgstr ""
#: ../src/editor.c:151 #: ../src/editor.c:157
msgid "_Help" msgid "_Insert"
msgstr "" msgstr ""
#: ../src/editor.c:158 #: ../src/editor.c:158
msgid "New" msgid "_Help"
msgstr ""
#: ../src/editor.c:159
msgid "Open"
msgstr ""
#: ../src/editor.c:161
msgid "Save"
msgstr ""
#: ../src/editor.c:162
msgid "Save as"
msgstr "" msgstr ""
#: ../src/editor.c:165 #: ../src/editor.c:165
msgid "Cut" msgid "New"
msgstr "" msgstr ""
#: ../src/editor.c:166 #: ../src/editor.c:166
msgid "Open"
msgstr ""
#: ../src/editor.c:168
msgid "Save"
msgstr ""
#: ../src/editor.c:169
msgid "Save as"
msgstr ""
#: ../src/editor.c:172
msgid "Cut"
msgstr ""
#: ../src/editor.c:173
msgid "Copy" msgid "Copy"
msgstr "" msgstr ""
#: ../src/editor.c:167 #: ../src/editor.c:174
msgid "Paste" msgid "Paste"
msgstr "" msgstr ""
#: ../src/editor.c:170 #: ../src/editor.c:177
msgid "Preferences" msgid "Preferences"
msgstr "" msgstr ""
#: ../src/editor.c:182 #: ../src/editor.c:189
msgid "none" msgid "none"
msgstr "" msgstr ""
#: ../src/editor.c:183 #: ../src/editor.c:190
msgid "characters" msgid "characters"
msgstr "" msgstr ""
#: ../src/editor.c:184 #: ../src/editor.c:191
msgid "words" msgid "words"
msgstr "" msgstr ""
#: ../src/editor.c:185 #: ../src/editor.c:192
msgid "words then characters" msgid "words then characters"
msgstr "" msgstr ""
#: ../src/editor.c:268 #: ../src/editor.c:275
msgid "Text editor - " msgid "Text editor - "
msgstr "" msgstr ""
#: ../src/editor.c:269 #: ../src/editor.c:276
msgid "(Untitled)" msgid "(Untitled)"
msgstr "" msgstr ""
#: ../src/editor.c:382 #: ../src/editor.c:389
msgid "translator-credits" msgid "translator-credits"
msgstr "" msgstr ""
#: ../src/editor.c:418 #: ../src/editor.c:425
msgid "Could not save configuration" msgid "Could not save configuration"
msgstr "" msgstr ""
#: ../src/editor.c:432 ../src/editor.c:437 #: ../src/editor.c:439 ../src/editor.c:444
msgid "Error" msgid "Error"
msgstr "" msgstr ""
#: ../src/editor.c:464 ../src/editor.c:474 ../src/editor.c:616 #: ../src/editor.c:471 ../src/editor.c:481 ../src/editor.c:709
#: ../src/editor.c:630 ../src/editor.c:779 ../src/editor.c:784 #: ../src/editor.c:723 ../src/editor.c:876 ../src/editor.c:881
msgid "Warning" msgid "Warning"
msgstr "" msgstr ""
#: ../src/editor.c:468 #: ../src/editor.c:475
msgid "" msgid ""
"There are unsaved changes.\n" "There are unsaved changes.\n"
"Discard or save them?" "Discard or save them?"
msgstr "" msgstr ""
#: ../src/editor.c:532 #: ../src/editor.c:539
msgid "Find text" msgid "Find text"
msgstr "" msgstr ""
#: ../src/editor.c:543 #: ../src/editor.c:550
msgid "Text:" msgid "Text:"
msgstr "" msgstr ""
#: ../src/editor.c:550 #: ../src/editor.c:557
msgid "Case-sensitive" msgid "Case-sensitive"
msgstr "" msgstr ""
#: ../src/editor.c:552 #: ../src/editor.c:559
msgid "Wrap" msgid "Wrap"
msgstr "" msgstr ""
#: ../src/editor.c:575 #: ../src/editor.c:582
msgid "Text not found" msgid "Text not found"
msgstr "" msgstr ""
#: ../src/editor.c:620 #: ../src/editor.c:661
msgid "Insert file..."
msgstr ""
#: ../src/editor.c:667 ../src/editor.c:790
msgid "Text files"
msgstr ""
#: ../src/editor.c:671 ../src/editor.c:794
msgid "All files"
msgstr ""
#: ../src/editor.c:713
msgid "" msgid ""
"There are unsaved changes.\n" "There are unsaved changes.\n"
"Are you sure you want to discard them?" "Are you sure you want to discard them?"
msgstr "" msgstr ""
#: ../src/editor.c:627 #: ../src/editor.c:720
msgid "Discard" msgid "Discard"
msgstr "" msgstr ""
#: ../src/editor.c:687 #: ../src/editor.c:784
msgid "Open file..." msgid "Open file..."
msgstr "" msgstr ""
#: ../src/editor.c:693 #: ../src/editor.c:852
msgid "Text files"
msgstr ""
#: ../src/editor.c:697
msgid "All files"
msgstr ""
#: ../src/editor.c:755
msgid "Partial write" msgid "Partial write"
msgstr "" msgstr ""
#: ../src/editor.c:783 #: ../src/editor.c:880
msgid "This file already exists. Overwrite?" msgid "This file already exists. Overwrite?"
msgstr "" msgstr ""
#: ../src/editor.c:792 #: ../src/editor.c:889
msgid "Allocation error" msgid "Allocation error"
msgstr "" msgstr ""
#: ../src/editor.c:807 #: ../src/editor.c:904
msgid "Save as..." msgid "Save as..."
msgstr "" msgstr ""
#: ../src/editor.c:864 #: ../src/editor.c:961
msgid "Text editor preferences" msgid "Text editor preferences"
msgstr "" msgstr ""
#: ../src/editor.c:881 #: ../src/editor.c:978
msgid "Font:" msgid "Font:"
msgstr "" msgstr ""
#: ../src/editor.c:891 #: ../src/editor.c:988
msgid "Wrap mode:" msgid "Wrap mode:"
msgstr "" msgstr ""

116
po/fr.po
View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Editor 0.1.1\n" "Project-Id-Version: Editor 0.1.1\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-10-25 13:16+0200\n" "POT-Creation-Date: 2011-10-25 15:13+0200\n"
"PO-Revision-Date: 2010-04-11 12:32+0200\n" "PO-Revision-Date: 2010-04-11 12:32+0200\n"
"Last-Translator: Calimero <calimeroteknik@free.fr>\n" "Last-Translator: Calimero <calimeroteknik@free.fr>\n"
"Language-Team: French\n" "Language-Team: French\n"
@ -73,125 +73,145 @@ msgid "_Preferences"
msgstr "_Préférences" msgstr "_Préférences"
#: ../src/editor.c:138 #: ../src/editor.c:138
msgid "_File..."
msgstr "_Fichier..."
#: ../src/editor.c:144
msgid "_About" msgid "_About"
msgstr "À _propos" msgstr "À _propos"
#: ../src/editor.c:149 #: ../src/editor.c:155
msgid "_File" msgid "_File"
msgstr "_Fichier" msgstr "_Fichier"
#: ../src/editor.c:150 #: ../src/editor.c:156
msgid "_Edit" msgid "_Edit"
msgstr "É_dition" msgstr "É_dition"
#: ../src/editor.c:151 #: ../src/editor.c:157
msgid "_Insert"
msgstr "_Insertion"
#: ../src/editor.c:158
msgid "_Help" msgid "_Help"
msgstr "_Aide" msgstr "_Aide"
#: ../src/editor.c:158 #: ../src/editor.c:165
msgid "New" msgid "New"
msgstr "Nouveau" msgstr "Nouveau"
#: ../src/editor.c:159 #: ../src/editor.c:166
msgid "Open" msgid "Open"
msgstr "Ouvrir" msgstr "Ouvrir"
#: ../src/editor.c:161 #: ../src/editor.c:168
msgid "Save" msgid "Save"
msgstr "Enregistrer" msgstr "Enregistrer"
#: ../src/editor.c:162 #: ../src/editor.c:169
msgid "Save as" msgid "Save as"
msgstr "Enregistrer sous" msgstr "Enregistrer sous"
#: ../src/editor.c:165 #: ../src/editor.c:172
msgid "Cut" msgid "Cut"
msgstr "Couper" msgstr "Couper"
#: ../src/editor.c:166 #: ../src/editor.c:173
msgid "Copy" msgid "Copy"
msgstr "Copier" msgstr "Copier"
#: ../src/editor.c:167 #: ../src/editor.c:174
msgid "Paste" msgid "Paste"
msgstr "Coller" msgstr "Coller"
#: ../src/editor.c:170 #: ../src/editor.c:177
msgid "Preferences" msgid "Preferences"
msgstr "Préférences" msgstr "Préférences"
#: ../src/editor.c:182 #: ../src/editor.c:189
msgid "none" msgid "none"
msgstr "aucun" msgstr "aucun"
#: ../src/editor.c:183 #: ../src/editor.c:190
msgid "characters" msgid "characters"
msgstr "caractères" msgstr "caractères"
#: ../src/editor.c:184 #: ../src/editor.c:191
msgid "words" msgid "words"
msgstr "mots" msgstr "mots"
#: ../src/editor.c:185 #: ../src/editor.c:192
msgid "words then characters" msgid "words then characters"
msgstr "mots puis caractères" msgstr "mots puis caractères"
#: ../src/editor.c:268 #: ../src/editor.c:275
msgid "Text editor - " msgid "Text editor - "
msgstr "Éditeur de texte - " msgstr "Éditeur de texte - "
#: ../src/editor.c:269 #: ../src/editor.c:276
msgid "(Untitled)" msgid "(Untitled)"
msgstr "(Sans titre)" msgstr "(Sans titre)"
#: ../src/editor.c:382 #: ../src/editor.c:389
msgid "translator-credits" msgid "translator-credits"
msgstr "" msgstr ""
"Calimero <calimeroteknik@free.fr>\n" "Calimero <calimeroteknik@free.fr>\n"
"Pierre Pronchery <khorben@defora.org>" "Pierre Pronchery <khorben@defora.org>"
#: ../src/editor.c:418 #: ../src/editor.c:425
msgid "Could not save configuration" msgid "Could not save configuration"
msgstr "Erreur lors de la sauvegarde de la configuration" msgstr "Erreur lors de la sauvegarde de la configuration"
#: ../src/editor.c:432 ../src/editor.c:437 #: ../src/editor.c:439 ../src/editor.c:444
msgid "Error" msgid "Error"
msgstr "Erreur" msgstr "Erreur"
#: ../src/editor.c:464 ../src/editor.c:474 ../src/editor.c:616 #: ../src/editor.c:471 ../src/editor.c:481 ../src/editor.c:709
#: ../src/editor.c:630 ../src/editor.c:779 ../src/editor.c:784 #: ../src/editor.c:723 ../src/editor.c:876 ../src/editor.c:881
msgid "Warning" msgid "Warning"
msgstr "Avertissement" msgstr "Avertissement"
#: ../src/editor.c:468 #: ../src/editor.c:475
msgid "" msgid ""
"There are unsaved changes.\n" "There are unsaved changes.\n"
"Discard or save them?" "Discard or save them?"
msgstr "" msgstr ""
"Il y a des changements non enregistrés.\n" "Il y a des changements non enregistrés.\n"
"Ignorer ou sauvegarder ?" "Abandonner ou enregistrer ?"
#: ../src/editor.c:532 #: ../src/editor.c:539
msgid "Find text" msgid "Find text"
msgstr "Rechercher" msgstr "Rechercher"
#: ../src/editor.c:543
msgid "Text:"
msgstr "Texte :"
#: ../src/editor.c:550 #: ../src/editor.c:550
msgid "Text:"
msgstr "Texte :"
#: ../src/editor.c:557
msgid "Case-sensitive" msgid "Case-sensitive"
msgstr "Sensible à la casse" msgstr "Sensible à la casse"
#: ../src/editor.c:552 #: ../src/editor.c:559
msgid "Wrap" msgid "Wrap"
msgstr "Boucler" msgstr "Boucler"
#: ../src/editor.c:575 #: ../src/editor.c:582
msgid "Text not found" msgid "Text not found"
msgstr "Texte non trouvé" msgstr "Texte non trouvé"
#: ../src/editor.c:620 #: ../src/editor.c:661
msgid "Insert file..."
msgstr "Insérer un fichier..."
#: ../src/editor.c:667 ../src/editor.c:790
msgid "Text files"
msgstr "Fichiers texte"
#: ../src/editor.c:671 ../src/editor.c:794
msgid "All files"
msgstr "Tous les fichiers"
#: ../src/editor.c:713
msgid "" msgid ""
"There are unsaved changes.\n" "There are unsaved changes.\n"
"Are you sure you want to discard them?" "Are you sure you want to discard them?"
@ -199,49 +219,41 @@ msgstr ""
"Il y a des changements non enregistrés.\n" "Il y a des changements non enregistrés.\n"
"Êtes-vous sûr de vouloir les annuler ?" "Êtes-vous sûr de vouloir les annuler ?"
#: ../src/editor.c:627 #: ../src/editor.c:720
msgid "Discard" msgid "Discard"
msgstr "Annuler" msgstr "Annuler"
#: ../src/editor.c:687 #: ../src/editor.c:784
msgid "Open file..." msgid "Open file..."
msgstr "Ouvrir un fichier..." msgstr "Ouvrir un fichier..."
#: ../src/editor.c:693 #: ../src/editor.c:852
msgid "Text files"
msgstr "Fichiers texte"
#: ../src/editor.c:697
msgid "All files"
msgstr "Tous les fichiers"
#: ../src/editor.c:755
msgid "Partial write" msgid "Partial write"
msgstr "Écriture partielle" msgstr "Écriture partielle"
#: ../src/editor.c:783 #: ../src/editor.c:880
msgid "This file already exists. Overwrite?" msgid "This file already exists. Overwrite?"
msgstr "Le fichier existe déjà. L'écraser ?" msgstr "Le fichier existe déjà. L'écraser ?"
#: ../src/editor.c:792 #: ../src/editor.c:889
msgid "Allocation error" msgid "Allocation error"
msgstr "Erreur d'allocation" msgstr "Erreur d'allocation"
#: ../src/editor.c:807 #: ../src/editor.c:904
msgid "Save as..." msgid "Save as..."
msgstr "Enregistrer sous..." msgstr "Enregistrer sous..."
#: ../src/editor.c:864 #: ../src/editor.c:961
msgid "Text editor preferences" msgid "Text editor preferences"
msgstr "Préférences de l'éditeur de texte" msgstr "Préférences de l'éditeur de texte"
#: ../src/editor.c:881 #: ../src/editor.c:978
msgid "Font:" msgid "Font:"
msgstr "Police :" msgstr "Police :"
#: ../src/editor.c:891 #: ../src/editor.c:988
msgid "Wrap mode:" msgid "Wrap mode:"
msgstr "Retour à la ligne :" msgstr "Retour à la ligne :"
#: ../src/main.c:43 #: ../src/main.c:43
msgid "Usage: editor [file]\n" msgid "Usage: editor [file]\n"

124
po/it.po
View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Editor 0.1.1\n" "Project-Id-Version: Editor 0.1.1\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-10-25 13:16+0200\n" "POT-Creation-Date: 2011-10-25 15:13+0200\n"
"PO-Revision-Date: 2010-04-09 16:43+0200\n" "PO-Revision-Date: 2010-04-09 16:43+0200\n"
"Last-Translator: Pierre Pronchery <khorben@defora.org>\n" "Last-Translator: Pierre Pronchery <khorben@defora.org>\n"
"Language-Team: Italian\n" "Language-Team: Italian\n"
@ -74,167 +74,179 @@ msgid "_Preferences"
msgstr "" msgstr ""
#: ../src/editor.c:138 #: ../src/editor.c:138
msgid "_File..."
msgstr ""
#: ../src/editor.c:144
msgid "_About" msgid "_About"
msgstr "" msgstr ""
#: ../src/editor.c:149 #: ../src/editor.c:155
msgid "_File" msgid "_File"
msgstr "" msgstr ""
#: ../src/editor.c:150 #: ../src/editor.c:156
msgid "_Edit" msgid "_Edit"
msgstr "" msgstr ""
#: ../src/editor.c:151 #: ../src/editor.c:157
msgid "_Help" msgid "_Insert"
msgstr "" msgstr ""
#: ../src/editor.c:158 #: ../src/editor.c:158
msgid "New" msgid "_Help"
msgstr ""
#: ../src/editor.c:159
msgid "Open"
msgstr ""
#: ../src/editor.c:161
msgid "Save"
msgstr ""
#: ../src/editor.c:162
msgid "Save as"
msgstr "" msgstr ""
#: ../src/editor.c:165 #: ../src/editor.c:165
msgid "Cut" msgid "New"
msgstr "" msgstr ""
#: ../src/editor.c:166 #: ../src/editor.c:166
msgid "Open"
msgstr ""
#: ../src/editor.c:168
msgid "Save"
msgstr ""
#: ../src/editor.c:169
msgid "Save as"
msgstr ""
#: ../src/editor.c:172
msgid "Cut"
msgstr ""
#: ../src/editor.c:173
msgid "Copy" msgid "Copy"
msgstr "" msgstr ""
#: ../src/editor.c:167 #: ../src/editor.c:174
msgid "Paste" msgid "Paste"
msgstr "" msgstr ""
#: ../src/editor.c:170 #: ../src/editor.c:177
msgid "Preferences" msgid "Preferences"
msgstr "" msgstr ""
#: ../src/editor.c:182 #: ../src/editor.c:189
msgid "none" msgid "none"
msgstr "" msgstr ""
#: ../src/editor.c:183 #: ../src/editor.c:190
msgid "characters" msgid "characters"
msgstr "" msgstr ""
#: ../src/editor.c:184 #: ../src/editor.c:191
msgid "words" msgid "words"
msgstr "" msgstr ""
#: ../src/editor.c:185 #: ../src/editor.c:192
msgid "words then characters" msgid "words then characters"
msgstr "" msgstr ""
#: ../src/editor.c:268 #: ../src/editor.c:275
msgid "Text editor - " msgid "Text editor - "
msgstr "" msgstr ""
#: ../src/editor.c:269 #: ../src/editor.c:276
msgid "(Untitled)" msgid "(Untitled)"
msgstr "" msgstr ""
#: ../src/editor.c:382 #: ../src/editor.c:389
msgid "translator-credits" msgid "translator-credits"
msgstr "" msgstr ""
#: ../src/editor.c:418 #: ../src/editor.c:425
msgid "Could not save configuration" msgid "Could not save configuration"
msgstr "" msgstr ""
#: ../src/editor.c:432 ../src/editor.c:437 #: ../src/editor.c:439 ../src/editor.c:444
msgid "Error" msgid "Error"
msgstr "" msgstr ""
#: ../src/editor.c:464 ../src/editor.c:474 ../src/editor.c:616 #: ../src/editor.c:471 ../src/editor.c:481 ../src/editor.c:709
#: ../src/editor.c:630 ../src/editor.c:779 ../src/editor.c:784 #: ../src/editor.c:723 ../src/editor.c:876 ../src/editor.c:881
msgid "Warning" msgid "Warning"
msgstr "" msgstr ""
#: ../src/editor.c:468 #: ../src/editor.c:475
msgid "" msgid ""
"There are unsaved changes.\n" "There are unsaved changes.\n"
"Discard or save them?" "Discard or save them?"
msgstr "" msgstr ""
#: ../src/editor.c:532 #: ../src/editor.c:539
msgid "Find text" msgid "Find text"
msgstr "" msgstr ""
#: ../src/editor.c:543 #: ../src/editor.c:550
msgid "Text:" msgid "Text:"
msgstr "" msgstr ""
#: ../src/editor.c:550 #: ../src/editor.c:557
msgid "Case-sensitive" msgid "Case-sensitive"
msgstr "" msgstr ""
#: ../src/editor.c:552 #: ../src/editor.c:559
msgid "Wrap" msgid "Wrap"
msgstr "" msgstr ""
#: ../src/editor.c:575 #: ../src/editor.c:582
msgid "Text not found" msgid "Text not found"
msgstr "" msgstr ""
#: ../src/editor.c:620 #: ../src/editor.c:661
msgid "Insert file..."
msgstr ""
#: ../src/editor.c:667 ../src/editor.c:790
msgid "Text files"
msgstr ""
#: ../src/editor.c:671 ../src/editor.c:794
msgid "All files"
msgstr ""
#: ../src/editor.c:713
msgid "" msgid ""
"There are unsaved changes.\n" "There are unsaved changes.\n"
"Are you sure you want to discard them?" "Are you sure you want to discard them?"
msgstr "" msgstr ""
#: ../src/editor.c:627 #: ../src/editor.c:720
msgid "Discard" msgid "Discard"
msgstr "" msgstr ""
#: ../src/editor.c:687 #: ../src/editor.c:784
msgid "Open file..." msgid "Open file..."
msgstr "" msgstr ""
#: ../src/editor.c:693 #: ../src/editor.c:852
msgid "Text files"
msgstr ""
#: ../src/editor.c:697
msgid "All files"
msgstr ""
#: ../src/editor.c:755
msgid "Partial write" msgid "Partial write"
msgstr "" msgstr ""
#: ../src/editor.c:783 #: ../src/editor.c:880
msgid "This file already exists. Overwrite?" msgid "This file already exists. Overwrite?"
msgstr "" msgstr ""
#: ../src/editor.c:792 #: ../src/editor.c:889
msgid "Allocation error" msgid "Allocation error"
msgstr "" msgstr ""
#: ../src/editor.c:807 #: ../src/editor.c:904
msgid "Save as..." msgid "Save as..."
msgstr "" msgstr ""
#: ../src/editor.c:864 #: ../src/editor.c:961
msgid "Text editor preferences" msgid "Text editor preferences"
msgstr "" msgstr ""
#: ../src/editor.c:881 #: ../src/editor.c:978
msgid "Font:" msgid "Font:"
msgstr "" msgstr ""
#: ../src/editor.c:891 #: ../src/editor.c:988
msgid "Wrap mode:" msgid "Wrap mode:"
msgstr "" msgstr ""

View File

@ -150,6 +150,15 @@ void on_help_about(gpointer data)
} }
/* on_insert_file */
void on_insert_file(gpointer data)
{
Editor * editor = data;
editor_insert_file_dialog(editor);
}
/* toolbar */ /* toolbar */
/* on_close */ /* on_close */
void on_close(gpointer data) void on_close(gpointer data)

View File

@ -36,6 +36,7 @@ void on_file_open(gpointer data);
void on_file_save(gpointer data); void on_file_save(gpointer data);
void on_file_save_as(gpointer data); void on_file_save_as(gpointer data);
void on_help_about(gpointer data); void on_help_about(gpointer data);
void on_insert_file(gpointer data);
/* toolbar */ /* toolbar */
void on_close(gpointer data); void on_close(gpointer data);

View File

@ -133,6 +133,12 @@ static DesktopMenu _editor_menu_edit[] =
{ NULL, NULL, NULL, 0, 0 } { NULL, NULL, NULL, 0, 0 }
}; };
static DesktopMenu _editor_menu_insert[] =
{
{ N_("_File..."), G_CALLBACK(on_insert_file), 0, 0, 0 },
{ NULL, NULL, NULL, 0, 0 }
};
static DesktopMenu _editor_menu_help[] = static DesktopMenu _editor_menu_help[] =
{ {
{ N_("_About"), G_CALLBACK(on_help_about), { N_("_About"), G_CALLBACK(on_help_about),
@ -148,6 +154,7 @@ static DesktopMenubar _editor_menubar[] =
{ {
{ N_("_File"), _editor_menu_file }, { N_("_File"), _editor_menu_file },
{ N_("_Edit"), _editor_menu_edit }, { N_("_Edit"), _editor_menu_edit },
{ N_("_Insert"), _editor_menu_insert },
{ N_("_Help"), _editor_menu_help }, { N_("_Help"), _editor_menu_help },
{ NULL, NULL } { NULL, NULL }
}; };
@ -590,6 +597,92 @@ static void _on_find_response(GtkWidget * widget, gint response, gpointer data)
} }
/* editor_insert_file */
int editor_insert_file(Editor * editor, char const * filename)
{
int ret = 0;
FILE * fp;
GtkTextBuffer * tbuf;
char buf[BUFSIZ];
size_t len;
char * p;
size_t rlen;
size_t wlen;
GError * error = NULL;
if((fp = fopen(filename, "r")) == NULL)
{
snprintf(buf, sizeof(buf), "%s: %s", filename, strerror(errno));
return -editor_error(editor, buf, 1);
}
tbuf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(editor->view));
while((len = fread(buf, sizeof(char), sizeof(buf), fp)) > 0)
{
/* FIXME code duplicated from editor_open() */
#if 0
if((p = g_convert(buf, len, "UTF-8", "ISO-8859-15", &rlen, &wlen, NULL)) != NULL)
{
gtk_text_buffer_insert_at_cursor(tbuf, p, wlen);
g_free(p);
}
else
gtk_text_buffer_insert(tbuf, &iter, buf, len);
#else
if((p = g_locale_to_utf8(buf, len, &rlen, &wlen, &error))
!= NULL)
/* FIXME may lose characters */
gtk_text_buffer_insert_at_cursor(tbuf, p, wlen);
else
{
editor_error(editor, error->message, 1);
g_error_free(error);
gtk_text_buffer_insert_at_cursor(tbuf, buf, len);
}
#endif
}
if(ferror(fp))
{
snprintf(buf, sizeof(buf), "%s: %s", filename, strerror(errno));
ret = -editor_error(editor, buf, 1);
}
fclose(fp);
return ret;
}
/* editor_insert_file_dialog */
int editor_insert_file_dialog(Editor * editor)
{
int ret;
GtkWidget * dialog;
GtkFileFilter * filter;
char * filename = NULL;
dialog = gtk_file_chooser_dialog_new(_("Insert file..."),
GTK_WINDOW(editor->window),
GTK_FILE_CHOOSER_ACTION_OPEN,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL);
filter = gtk_file_filter_new();
gtk_file_filter_set_name(filter, _("Text files"));
gtk_file_filter_add_mime_type(filter, "text/plain");
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter);
filter = gtk_file_filter_new();
gtk_file_filter_set_name(filter, _("All files"));
gtk_file_filter_add_pattern(filter, "*");
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter);
if(gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT)
filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(
dialog));
gtk_widget_destroy(dialog);
if(filename == NULL)
return 0;
ret = editor_insert_file(editor, filename);
g_free(filename);
return ret;
}
/* editor_open */ /* editor_open */
void editor_open(Editor * editor, char const * filename) void editor_open(Editor * editor, char const * filename)
{ {
@ -666,7 +759,11 @@ void editor_open(Editor * editor, char const * filename)
/* FIXME may lose characters */ /* FIXME may lose characters */
gtk_text_buffer_insert(tbuf, &iter, p, wlen); gtk_text_buffer_insert(tbuf, &iter, p, wlen);
else else
{
editor_error(editor, error->message, 1);
g_error_free(error);
gtk_text_buffer_insert(tbuf, &iter, buf, len); gtk_text_buffer_insert(tbuf, &iter, buf, len);
}
#endif #endif
} }
fclose(fp); fclose(fp);

View File

@ -53,6 +53,9 @@ void editor_copy(Editor * editor);
void editor_cut(Editor * editor); void editor_cut(Editor * editor);
void editor_paste(Editor * editor); void editor_paste(Editor * editor);
int editor_insert_file(Editor * editor, char const * filename);
int editor_insert_file_dialog(Editor * editor);
gboolean editor_save(Editor * editor); gboolean editor_save(Editor * editor);
gboolean editor_save_as(Editor * editor, char const * filename); gboolean editor_save_as(Editor * editor, char const * filename);
gboolean editor_save_as_dialog(Editor * editor); gboolean editor_save_as_dialog(Editor * editor);