passepartout r1534 - in trunk: po src/pptout
- From: herzi svn gnome org
- To: svn-commits-list gnome org
- Subject: passepartout r1534 - in trunk: po src/pptout
- Date: Wed, 8 Apr 2009 19:25:16 +0000 (UTC)
Author: herzi
Date: Wed Apr 8 19:25:16 2009
New Revision: 1534
URL: http://svn.gnome.org/viewvc/passepartout?rev=1534&view=rev
Log:
improved the main window translatability
* po/POTFILES.in: new translatable files
* po/de.po: updated German translation
* src/pptout/window.cc,
* src7pptout/windowmenus.cc: added more translatable strings
Modified:
trunk/po/POTFILES.in
trunk/po/de.po
trunk/src/pptout/window.cc
trunk/src/pptout/windowmenus.cc
Modified: trunk/po/POTFILES.in
==============================================================================
--- trunk/po/POTFILES.in (original)
+++ trunk/po/POTFILES.in Wed Apr 8 19:25:16 2009
@@ -1,2 +1,4 @@
passepartout.desktop.in
src/pptout/main.cc
+src/pptout/window.cc
+src/pptout/windowmenus.cc
Modified: trunk/src/pptout/window.cc
==============================================================================
--- trunk/src/pptout/window.cc (original)
+++ trunk/src/pptout/window.cc Wed Apr 8 19:25:16 2009
@@ -24,6 +24,8 @@
#include "streamdialog.h"
#include "pagesel.h"
+#include <glib/gi18n.h>
+
namespace{
typedef std::set<FrameWindow*> Windows;
Windows windows; // a list of all windows
@@ -57,17 +59,17 @@
signal_key_press_event().connect
(sigc::mem_fun(document_view, &DocumentView::on_key_press_event));
- open_dialog.reset(new Filesel(*this, "Open"));
- save_dialog.reset(new Filesel(*this, "Save As",
+ open_dialog.reset(new Filesel(*this, _("Open")));
+ save_dialog.reset(new Filesel(*this, _("Save As"),
Gtk::FILE_CHOOSER_ACTION_SAVE));
// file filters
{
Gtk::FileFilter pfilter;
- pfilter.set_name("Passepartout Document files");
+ pfilter.set_name(_("Passepartout Document files (.pp)"));
pfilter.add_pattern("*.pp");
Gtk::FileFilter afilter;
- afilter.set_name("All files");
+ afilter.set_name(_("All files"));
afilter.add_pattern("*");
open_dialog->add_filter(pfilter);
save_dialog->add_filter(pfilter);
@@ -84,7 +86,7 @@
try { factor = length_units.get_factor(unit); }
catch(unknown_unit_error&) { unit = Glib::ustring(); }
import_dialog.reset
- (new ImageFilesel(*this, "Import Image",
+ (new ImageFilesel(*this, _("Import Image"),
config.DefaultResolution.values.front(),
unit, factor));
}
@@ -131,13 +133,13 @@
cafe_opera->property_spacing() = double_space;
cafe_opera->pack_end(*pagesel, Gtk::PACK_SHRINK, 0);
- Gtk::Label *page_label = manage(new Gtk::Label("P_age:", true));
+ Gtk::Label *page_label = manage(new Gtk::Label(_("P_age:"), true));
page_label->set_mnemonic_widget(pagesel->get_menu());
cafe_opera->pack_end(*page_label,
Gtk::PACK_SHRINK, 0);
cafe_opera->pack_end(zoom_factor.get_widget(), Gtk::PACK_SHRINK, 0);
- Gtk::Label *zoom_label = manage(new Gtk::Label("_Zoom:", true));
+ Gtk::Label *zoom_label = manage(new Gtk::Label(_("_Zoom:"), true));
zoom_label->set_mnemonic_widget(zoom_factor.get_widget());
cafe_opera->pack_end(*zoom_label, Gtk::PACK_SHRINK, 0);
@@ -186,9 +188,9 @@
void FrameWindow::set_filename(const Glib::ustring &filename) {
if(!filename.empty()) {
- set_title(basename(filename) + " - Passepartout");
+ set_title(Glib::ustring::compose("%1 - Passepartout", basename(filename)));
} else
- set_title("Passepartout");
+ set_title(_("Passepartout"));
}
void FrameWindow::zoom_factor_changed_action(float factor) {
Modified: trunk/src/pptout/windowmenus.cc
==============================================================================
--- trunk/src/pptout/windowmenus.cc (original)
+++ trunk/src/pptout/windowmenus.cc Wed Apr 8 19:25:16 2009
@@ -21,6 +21,8 @@
#include "templatepagedialog.h"
#include "clipboard.h"
+#include <glib/gi18n.h>
+
namespace {
template<class P> P nonull(P p) {
if(!p)
@@ -138,42 +140,42 @@
/// *** file menu ***
- main_group->add(Action::create("FileMenu", "_File"));
+ main_group->add(Action::create("FileMenu", _("_File")));
- main_group->add(Action::create("FileNew", Stock::NEW, "_New ...",
- "Create a new document"),
+ main_group->add(Action::create("FileNew", Stock::NEW, _("_New ..."),
+ _("Create a new document")),
bind(sigc::ptr_fun(&new_document), &document_view));
- doc_group->add(Action::create("FileNewView", "New Vi_ew",
- "Create a new window "
- "for the current document"),
+ doc_group->add(Action::create("FileNewView", _("New Vi_ew"),
+ _("Create a new window "
+ "for the current document")),
bind(sigc::ptr_fun(&duplicate_view), this));
- main_group->add(Action::create("FileOpen", Stock::OPEN, "_Open ...",
- "Open a document"),
+ main_group->add(Action::create("FileOpen", Stock::OPEN, _("_Open ..."),
+ _("Open a document")),
mem_fun(*open_dialog, &Filesel::show_all));
- doc_group->add(Action::create("FileSave", Stock::SAVE, "_Save ...",
- "Save document"),
+ doc_group->add(Action::create("FileSave", Stock::SAVE, _("_Save ..."),
+ _("Save document")),
mem_fun(*this, &FrameWindow::save));
doc_group->add(Action::create("FileSaveAs", Stock::SAVE_AS),
AccelKey("<shift><control>S"),
mem_fun(*save_dialog, &Filesel::show_all));
- page_group->add(Action::create("FilePrint", Stock::PRINT, "_Print ...",
- "Print document"),
+ page_group->add(Action::create("FilePrint", Stock::PRINT, _("_Print ..."),
+ _("Print document")),
AccelKey("<control>P"),
mem_fun(*print_dialog, &PrintDialog::show_it));
page_group->add(Action::create("FilePrintPreview", Stock::PRINT_PREVIEW,
- "Print Pre_view ...",
- "Print document to external viewer"),
+ _("Print Pre_view ..."),
+ _("Print document to external viewer")),
AccelKey("<shift><control>P"),
bind(sigc::ptr_fun(&print_to_viewer), &document_view));
- doc_group->add(Action::create("FileDocProps", "P_roperties ...",
- "Document properties"),
+ doc_group->add(Action::create("FileDocProps", _("P_roperties ..."),
+ _("Document properties")),
bind(sigc::ptr_fun(&show_doc_props_dialog), &document_view));
main_group->add(Action::create("FileClose", Stock::CLOSE),
@@ -185,7 +187,7 @@
/// *** edit menu ***
- main_group->add(Action::create("EditMenu", "_Edit"));
+ main_group->add(Action::create("EditMenu", _("_Edit")));
selection_group->add(Action::create("EditCopy", Stock::COPY),
bind(sigc::ptr_fun(&copi), &document_view));
@@ -200,60 +202,60 @@
AccelKey("Delete"),
bind(sigc::ptr_fun(&delete_selected), &document_view));
- page_group->add(Action::create("EditSelectAll", "Select _All"),
+ page_group->add(Action::create("EditSelectAll", _("Select _All")),
AccelKey("<control>A"),
bind(sigc::ptr_fun(&select_all_frames), &document_view,
true /* select */));
- page_group->add(Action::create("EditUnselectAll", "Dese_lect All"),
+ page_group->add(Action::create("EditUnselectAll", _("Dese_lect All")),
AccelKey("<shift><control>A"),
bind(sigc::ptr_fun(&select_all_frames), &document_view,
false /* deselect */));
// *** arrange submenu ***
- main_group->add(Action::create("ArrangeMenu", "A_rrange"));
+ main_group->add(Action::create("ArrangeMenu", _("A_rrange")));
- selection_group->add(Action::create("ArrangeGroup", "_Group"),
+ selection_group->add(Action::create("ArrangeGroup", _("_Group")),
AccelKey("<control>G"),
bind(sigc::ptr_fun(group_selected), &document_view));
- selection_group->add(Action::create("ArrangeUngroup", "_Ungroup"),
+ selection_group->add(Action::create("ArrangeUngroup", _("_Ungroup")),
AccelKey("<control>U"),
bind(sigc::ptr_fun(ungroup_selected), &document_view));
selection_group->add(Action::create("ArrangeTop", Stock::GOTO_TOP,
- "Move to _top", "Move to top"),
+ _("Move to _top"), _("Move to top")),
AccelKey("<control>Home"),
bind(sigc::ptr_fun(&rearrange_selected),
&document_view, TOP));
selection_group->add(Action::create("ArrangeUp", Stock::GO_UP,
- "Move _up", "Move up"),
+ _("Move _up"), _("Move up")),
AccelKey("<control>Page_Up"),
bind(sigc::ptr_fun(&rearrange_selected),
&document_view, UP));
selection_group->add(Action::create("ArrangeDown", Stock::GO_DOWN,
- "Move _down", "Move down"),
+ _("Move _down"), _("Move down")),
AccelKey("<control>Page_Down"),
bind(sigc::ptr_fun(&rearrange_selected),
&document_view, DOWN));
selection_group->add(Action::create("ArrangeBottom", Stock::GOTO_BOTTOM,
- "Move to _bottom", "Move to bottom"),
+ _("Move to _bottom"), _("Move to bottom")),
AccelKey("<control>End"),
bind(sigc::ptr_fun(&rearrange_selected),
&document_view, DOWN));
page_group->add(Action::create("EditInsertText", StockID("newframe"),
- "Insert Te_xt Frame ...",
- "Insert text frame"),
+ _("Insert Te_xt Frame ..."),
+ _("Insert text frame")),
mem_fun(*text_frame_dialog, &TextFrameDialog::show_raise));
page_group->add(Action::create("EditInsertImage", StockID("moose"),
- "Insert _Image ...", "Insert image"),
+ _("Insert _Image ..."), _("Insert image")),
mem_fun(*import_dialog, &Filesel::show_all));
main_group->add(Action::create("EditPrefs", Stock::PREFERENCES),
@@ -262,30 +264,30 @@
// *** page menu ***
- main_group->add(Action::create("PageMenu", "_Page"));
+ main_group->add(Action::create("PageMenu", _("_Page")));
- page_group->add(Action::create("PageDelete", "_Delete"),
+ page_group->add(Action::create("PageDelete", _("_Delete")),
mem_fun(document_view, &DocumentView::delete_page));
- doc_group->add(Action::create("PageInsertBefore", "Insert _Before ..."),
+ doc_group->add(Action::create("PageInsertBefore", _("Insert _Before ...")),
bind(sigc::ptr_fun(&insert_page),
this, &document_view, false /* not after */));
// we only need one of these when we don't have any pages
- page_group->add(Action::create("PageInsertAfter", "Insert _After ..."),
+ page_group->add(Action::create("PageInsertAfter", _("Insert _After ...")),
bind(sigc::ptr_fun(&insert_page),
this, &document_view, true /* after */));
// *** view menu ***
- main_group->add(Action::create("ViewMenu", "_View"));
+ main_group->add(Action::create("ViewMenu", _("_View")));
- main_group->add(ToggleAction::create("ViewToolbar", "_Toolbar", "",
+ main_group->add(ToggleAction::create("ViewToolbar", _("_Toolbar"), "",
true /* active */),
bind(sigc::ptr_fun(toggle_toolbar), uimanager));
{
Glib::RefPtr<ToggleAction> action =
- ToggleAction::create("ViewFullScreen", "_Full screen", "",
+ ToggleAction::create("ViewFullScreen", _("_Full screen"), "",
false /* not active */);
main_group->add(action, AccelKey("F11"),
bind(sigc::ptr_fun(toggle_fullscreen), action, this));
@@ -302,37 +304,37 @@
bind(sigc::ptr_fun(&zoom), &zoom_factor, Stock::ZOOM_100));
doc_group->add(Action::create("ViewProps", Stock::PROPERTIES,
- "_Properties", "Show Properties window"),
+ _("_Properties"), _("Show Properties window")),
mem_fun(PropertiesDialog::instance(),
&PropertiesDialog::show_raise));
doc_group->add(Action::create("ViewStreams", StockID("streams"),
- "_Streams", "Show Streams window"),
+ _("_Streams"), _("Show Streams window")),
mem_fun(StreamDialog::instance(),
&StreamDialog::show_raise));
{
Glib::RefPtr<Gtk::ToggleAction> action =
ToggleAction::create("ViewSnapGrid", StockID("grid"),
- "Snap to _grid", "Toggle snap to grid");
+ _("Snap to _grid"), _("Toggle snap to grid"));
doc_group->add(action,
bind(sigc::ptr_fun(&toggle_grid), action, &document_view));
}
// *** help menu ***
- main_group->add(Action::create("HelpMenu", "_Help"));
+ main_group->add(Action::create("HelpMenu", _("_Help")));
- main_group->add(Action::create("HelpHelp", Stock::HELP,"_User's guide"),
+ main_group->add(Action::create("HelpHelp", Stock::HELP, _("_User's guide")),
AccelKey("F1"),
ptr_fun(&Programs::open_docs));
- main_group->add(Action::create("HelpAbout", "_About"),
+ main_group->add(Action::create("HelpAbout", _("_About")),
mem_fun(::AboutDialog::instance(), &::AboutDialog::show_all));
- main_group->add(Action::create("HelpHomepage", Stock::HOME, "_Homepage"),
+ main_group->add(Action::create("HelpHomepage", Stock::HOME, _("_Homepage")),
ptr_fun(&Programs::open_homepage));
- main_group->add(Action::create("HelpInspiration", "_Inspiration"),
+ main_group->add(Action::create("HelpInspiration", _("_Inspiration")),
mem_fun(Inspiration::instance(),
&Inspiration::show_all));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]