root / tags / v2_0_0_Build_2051 / extensions / extI18n / src / main / java / org / gvsig / i18n / extension / I18nExtension.java @ 38726
History | View | Annotate | Download (2.62 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Government (CIT)
|
5 |
*
|
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 |
import org.gvsig.about.AboutManager; |
30 |
import org.gvsig.about.AboutParticipant; |
31 |
import org.gvsig.andami.IconThemeHelper; |
32 |
import org.gvsig.andami.plugins.Extension; |
33 |
import org.gvsig.app.ApplicationLocator; |
34 |
import org.gvsig.app.ApplicationManager; |
35 |
import org.gvsig.i18n.extension.preferences.I18nPreferencePage; |
36 |
import org.gvsig.tools.ToolsLocator; |
37 |
|
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 |
// Nothing to do
|
48 |
} |
49 |
|
50 |
public void initialize() { |
51 |
IconThemeHelper.registerIcon("preferences", "i18n-preferences", this); |
52 |
|
53 |
// Replace the default locale Preferences page for the new one
|
54 |
ToolsLocator.getExtensionPointManager() |
55 |
.add("AplicationPreferences", "").append("LanguagePage", "", |
56 |
new I18nPreferencePage());
|
57 |
} |
58 |
|
59 |
public void postInitialize() { |
60 |
// Register the about panel
|
61 |
ApplicationManager application = ApplicationLocator.getManager(); |
62 |
|
63 |
AboutManager about = application.getAbout(); |
64 |
|
65 |
about.addDeveloper( |
66 |
"DISID",
|
67 |
this.getClass().getClassLoader().getResource("disid.html"), |
68 |
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 |
} |
79 |
|
80 |
public boolean isEnabled() { |
81 |
return false; |
82 |
} |
83 |
|
84 |
public boolean isVisible() { |
85 |
return false; |
86 |
} |
87 |
} |