svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.plugin / org.gvsig.i18n.app / org.gvsig.i18n.app.mainplugin / src / main / java / org / gvsig / i18n / extension / I18nExtension.java @ 44172
History | View | Annotate | Download (2.7 KB)
1 |
/**
|
---|---|
2 |
* gvSIG. Desktop Geographic Information System.
|
3 |
*
|
4 |
* Copyright (C) 2007-2013 gvSIG Association.
|
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 3
|
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 |
* For any additional information, do not hesitate to contact us
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com.
|
23 |
*/
|
24 |
/*
|
25 |
* AUTHORS (In addition to CIT):
|
26 |
* 2008 {DiSiD Technologies} {New extension for installation and update of text translations}
|
27 |
*/
|
28 |
package org.gvsig.i18n.extension; |
29 |
|
30 |
import org.gvsig.about.AboutManager; |
31 |
import org.gvsig.about.AboutParticipant; |
32 |
import org.gvsig.andami.IconThemeHelper; |
33 |
import org.gvsig.andami.plugins.Extension; |
34 |
import org.gvsig.app.ApplicationLocator; |
35 |
import org.gvsig.app.ApplicationManager; |
36 |
import org.gvsig.i18n.extension.preferences.I18nPreferencePage; |
37 |
import org.gvsig.tools.ToolsLocator; |
38 |
|
39 |
|
40 |
/**
|
41 |
* Texts localization management extension.
|
42 |
*
|
43 |
* @author <a href="mailto:dcervera@disid.com">David Cervera</a>
|
44 |
*/
|
45 |
public class I18nExtension extends Extension { |
46 |
|
47 |
public void execute(String actionCommand) { |
48 |
// Nothing to do
|
49 |
} |
50 |
|
51 |
public void initialize() { |
52 |
IconThemeHelper.registerIcon("preferences", "i18n-preferences", this); |
53 |
|
54 |
// Replace the default locale Preferences page for the new one
|
55 |
ToolsLocator.getExtensionPointManager() |
56 |
.add("AplicationPreferences", "").append("LanguagePage", "", |
57 |
new I18nPreferencePage());
|
58 |
} |
59 |
|
60 |
public void postInitialize() { |
61 |
// Register the about panel
|
62 |
ApplicationManager application = ApplicationLocator.getManager(); |
63 |
|
64 |
// AboutManager about = application.getAbout();
|
65 |
//
|
66 |
// about.addDeveloper(
|
67 |
// "DISID",
|
68 |
// this.getClass().getClassLoader().getResource("about/disid.html"),
|
69 |
// 1
|
70 |
// );
|
71 |
//
|
72 |
// AboutParticipant participant = about.getDeveloper("DISID");
|
73 |
// participant.addContribution(
|
74 |
// "I18nExtension",
|
75 |
// "gvSIG translations management extension",
|
76 |
// 2009,1,1,
|
77 |
// 2009,12,31
|
78 |
// );
|
79 |
} |
80 |
|
81 |
public boolean isEnabled() { |
82 |
return false; |
83 |
} |
84 |
|
85 |
public boolean isVisible() { |
86 |
return false; |
87 |
} |
88 |
} |