root / tags / v2_0_0_Build_2057 / extensions / extI18n / src / main / java / org / gvsig / i18n / extension / I18nExtension.java @ 39159
History | View | Annotate | Download (2.62 KB)
1 | 25963 | cordinyana | /* gvSIG. Geographic Information System of the Valencian Government
|
---|---|---|---|
2 | *
|
||
3 | * Copyright (C) 2007-2008 Infrastructures and Transports Department
|
||
4 | 31544 | cordinyana | * of the Valencian Government (CIT)
|
5 | 25963 | cordinyana | *
|
6 | * This program is free software; you can redistribute it and/or
|
||
7 | * modify it under the terms of the GNU General Public License
|
||
8 | * as published by the Free Software Foundation; either version 2
|
||
9 | * of the License, or (at your option) any later version.
|
||
10 | *
|
||
11 | * This program is distributed in the hope that it will be useful,
|
||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
14 | * GNU General Public License for more details.
|
||
15 | *
|
||
16 | * You should have received a copy of the GNU General Public License
|
||
17 | * along with this program; if not, write to the Free Software
|
||
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||
19 | * MA 02110-1301, USA.
|
||
20 | *
|
||
21 | */
|
||
22 | |||
23 | /*
|
||
24 | * AUTHORS (In addition to CIT):
|
||
25 | * 2008 {DiSiD Technologies} {New extension for installation and update of text translations}
|
||
26 | */
|
||
27 | package org.gvsig.i18n.extension; |
||
28 | |||
29 | 34002 | jjdelcerro | import org.gvsig.about.AboutManager; |
30 | import org.gvsig.about.AboutParticipant; |
||
31 | 38564 | jjdelcerro | import org.gvsig.andami.IconThemeHelper; |
32 | 29635 | jpiera | import org.gvsig.andami.plugins.Extension; |
33 | 34002 | jjdelcerro | import org.gvsig.app.ApplicationLocator; |
34 | import org.gvsig.app.ApplicationManager; |
||
35 | 25963 | cordinyana | import org.gvsig.i18n.extension.preferences.I18nPreferencePage; |
36 | 28558 | cordinyana | import org.gvsig.tools.ToolsLocator; |
37 | 25963 | cordinyana | |
38 | |||
39 | /**
|
||
40 | * Texts localization management extension.
|
||
41 | *
|
||
42 | * @author <a href="mailto:dcervera@disid.com">David Cervera</a>
|
||
43 | */
|
||
44 | public class I18nExtension extends Extension { |
||
45 | |||
46 | public void execute(String actionCommand) { |
||
47 | 28558 | cordinyana | // Nothing to do
|
48 | 25963 | cordinyana | } |
49 | |||
50 | public void initialize() { |
||
51 | 38564 | jjdelcerro | IconThemeHelper.registerIcon("preferences", "i18n-preferences", this); |
52 | |||
53 | 28558 | cordinyana | // Replace the default locale Preferences page for the new one
|
54 | ToolsLocator.getExtensionPointManager() |
||
55 | .add("AplicationPreferences", "").append("LanguagePage", "", |
||
56 | new I18nPreferencePage());
|
||
57 | 25963 | cordinyana | } |
58 | |||
59 | public void postInitialize() { |
||
60 | 28558 | cordinyana | // Register the about panel
|
61 | 34002 | jjdelcerro | ApplicationManager application = ApplicationLocator.getManager(); |
62 | |||
63 | AboutManager about = application.getAbout(); |
||
64 | |||
65 | about.addDeveloper( |
||
66 | "DISID",
|
||
67 | 34007 | cordinyana | this.getClass().getClassLoader().getResource("disid.html"), |
68 | 34002 | jjdelcerro | 1
|
69 | ); |
||
70 | |||
71 | AboutParticipant participant = about.getDeveloper("DISID");
|
||
72 | participant.addContribution( |
||
73 | "I18nExtension",
|
||
74 | "gvSIG translations management extension",
|
||
75 | 2009,1,1, |
||
76 | 2009,12,31 |
||
77 | ); |
||
78 | 25963 | cordinyana | } |
79 | |||
80 | public boolean isEnabled() { |
||
81 | 38564 | jjdelcerro | return false; |
82 | 25963 | cordinyana | } |
83 | |||
84 | public boolean isVisible() { |
||
85 | 38564 | jjdelcerro | return false; |
86 | 25963 | cordinyana | } |
87 | } |