/gpump/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/gpump/trunk

« back to all changes in this revision

Viewing changes to src/app.js

  • Committer: Gustav Hartvigsson
  • Date: 2014-08-03 21:09:38 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20140803210938-jfhdl23v4mzji6pf
* Added translation files (messeges.po and sv.po)
* fixed a few gettext errors in app.js
* TODO:
  * Make the translations not be as "fixed" as they are now.
  * Add auto update/compile for the translations to makefile.

  * Switch to a better build system?

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
const Gtk = imports.gi.Gtk;
13
13
const Lang = imports.lang;
14
14
const _ = imports.gettext.gettext;
15
 
 
 
15
const Gettext = imports.gettext;
16
16
 
17
17
const SettingsData = imports.settings_data;
18
18
/* const Style = imports.style; */
25
25
  _init: function () {
26
26
    this.settings = SettingsData.get_settings ();
27
27
    
 
28
    Gettext.bindtextdomain ("gpump", "./locale/"); //FIXME
 
29
    Gettext.textdomain ("gpump");
 
30
    GLib.set_prgname ("gpump");
 
31
    
28
32
    this.parent ({
29
33
      application_id: "org.gego.gpump",
30
34
      flags: Gio.ApplicationFlags.FLAGS_NONE,
69
73
    
70
74
    this.window.set_titlebar ((this.headerbar = new Gtk.HeaderBar({
71
75
      title: GLib.get_application_name (),
72
 
      subtitle: _('A Pump.io client'),
 
76
      subtitle: _("A Pump.io client"),
73
77
      show_close_button: true
74
78
    })));
75
79
    
105
109
    let menu = new Gio.Menu ();
106
110
    let section = new Gio.Menu ();
107
111
    
108
 
    section.append ("Preferences", "app.preferences");
 
112
    section.append (_("Preferences"), "app.preferences");
109
113
    menu.append_section (null, section);
110
114
    
111
115
    section = new Gio.Menu ();
164
168
  _prepare_header_bar: function () {
165
169
    this.headerbar.pack_start ((this.new_post_btn = new Gtk.Button ({
166
170
      image: (new Gtk.Image ({icon_name: 'text-editor-symbolic'})),
167
 
      tooltip_text: _('Create new post')
 
171
      tooltip_text: _("Create new post")
168
172
    })));
169
173
    
170
174
    this.headerbar.pack_start ((this.refresh_btn = new Gtk.Button({
171
175
      image: (new Gtk.Image ({icon_name: 'emblem-synchronizing-symbolic'})),
172
 
      tooltip_text: _('Refresh the stream')
 
176
      tooltip_text: _("Refresh the stream")
173
177
    })));
174
178
    
175
179
    this.headerbar.pack_end ((this.user_menu_btn = new Gtk.Button ({
176
180
      image: (new Gtk.Image ({icon_name: 'emblem-system-symbolic'})),
177
 
      tooltip_text: _('Switch and manage users')
 
181
      tooltip_text: _("Switch and manage users")
178
182
    })));
179
183
  }
180
184