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 | 40557 | jjdelcerro | /**
|
---|---|---|---|
2 | * gvSIG. Desktop Geographic Information System.
|
||
3 | 40435 | jjdelcerro | *
|
4 | 40557 | jjdelcerro | * Copyright (C) 2007-2013 gvSIG Association.
|
5 | *
|
||
6 | 40435 | jjdelcerro | * This program is free software; you can redistribute it and/or
|
7 | * modify it under the terms of the GNU General Public License
|
||
8 | 40557 | jjdelcerro | * as published by the Free Software Foundation; either version 3
|
9 | 40435 | jjdelcerro | * of the License, or (at your option) any later version.
|
10 | 40557 | jjdelcerro | *
|
11 | 40435 | jjdelcerro | * 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 | 40557 | jjdelcerro | *
|
16 | 40435 | jjdelcerro | * 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 | 40557 | jjdelcerro | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 | 40435 | jjdelcerro | * MA 02110-1301, USA.
|
20 | 40557 | jjdelcerro | *
|
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 | 40435 | jjdelcerro | */
|
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 | 44172 | jjdelcerro | // 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 | 40435 | jjdelcerro | } |
80 | |||
81 | public boolean isEnabled() { |
||
82 | return false; |
||
83 | } |
||
84 | |||
85 | public boolean isVisible() { |
||
86 | return false; |
||
87 | } |
||
88 | } |