File: l10n_main.rb

package info (click to toggle)
ruby-gnome2 0.15.0-1.1etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 7,704 kB
  • ctags: 8,558
  • sloc: ansic: 69,912; ruby: 19,511; makefile: 97; xml: 35; sql: 13
file content (53 lines) | stat: -rw-r--r-- 1,139 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/env ruby
=begin
  l10n.rb - Ruby/Libglade2 sample script.

  - Localization.
  - Don't touch auto-generated code(l10n_gui.rb).

  Required: Ruby-GetText-Package-0.6.1 or later.

  Copyright (c) 2004-2006 Ruby-GNOME2 Project
  This program is licenced under the same licence as Ruby-GNOME2.

  $Id: l10n_main.rb,v 1.5 2006/06/17 14:14:55 mutoh Exp $
=end

#
# Auto-generated code by ruby-glade-create_template.
# You don't need touch here.
#
require 'l10n_gui'
 
class L10n < L10nGlade
  include GetText

  # Set values as your own application. 
  PROG_PATH = "l10n.glade"
  PROG_NAME = "l10n"
  LOCALE_DIR = "locale"

  def initialize
    super(PROG_PATH, nil, PROG_NAME, LOCALE_DIR)
    # bind a textdomain to this file(you need to write this in each files).
    bindtextdomain(PROG_NAME, LOCALE_DIR, nil, "UTF-8")
    # :
    # Write your own code for initialization.
    # :
  end

  def on_hello_button_clicked(widget)
    @glade["entry"].text = _("Hello World")
  end

  def on_window1_destroy_event(widget, arg0)
    Gtk.main_quit
  end

  def on_exit_button_clicked(widget)
    Gtk.main_quit
  end
end

L10n.new
Gtk.main