slitaz-configs view ob-menu/menu.xml.in @ rev 312

Make Openbox menu translated again.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Sep 27 15:17:39 2017 +0300 (21 months ago)
parents 282b0ffc7a1d
children
line source
1 # don't forget to add "locale-**" as BUILD_DEPENDS to slitaz-configs receipt
2 # in case of adding new menu languages
3 case $1 in
4 de) L='de_DE';;
5 en) L='en_US';;
6 fr) L='fr_FR';;
7 hu) L='hu_HU';;
8 ja) L='ja_JP';;
9 pt|pt_BR) L='pt_BR';;
10 ru) L='ru_RU';;
11 zh_CN) L='zh_CN';;
12 esac
14 mkdir -p "/usr/lib/locale/$L.UTF-8"
15 localedef -i "$L" -c -f 'UTF-8' "/usr/lib/locale/$L.UTF-8"
17 export LC_ALL="$L.UTF-8" TEXTDOMAIN='slitaz-ob-menu'
19 cat <<EOT
20 <?xml version="1.0" encoding="UTF-8"?>
21 <openbox_menu xmlns="http://openbox.org/3.4/menu">
23 <!-- Favorite applications -->
24 <menu id="favorites-menu" label="$(gettext 'Favorite Applications')">
25 <item label="$(gettext 'File Manager')">
26 <action name="Execute"><command>file-manager</command></action>
27 </item>
28 <item label="$(gettext 'Terminal')">
29 <action name="Execute"><command>terminal</command></action>
30 </item>
31 <item label="$(gettext 'Web Browser')">
32 <action name="Execute"><command>browser</command></action>
33 </item>
34 <item label="$(gettext 'Text Editor')">
35 <action name="Execute"><command>editor</command></action>
36 </item>
37 <separator />
38 <item label="$(gettext 'Configure favorites')">
39 <action name="Execute"><command>tazbox tazapps</command></action>
40 </item>
41 <item label="$(gettext 'Configure/install favorites (tazx)')">
42 <action name="Execute"><command>terminal -e tazx</command></action>
43 </item>
44 </menu>
46 <!-- Desktop effects -->
47 <menu id="desktop-effects" label="$(gettext 'Desktop Effects')">
48 <item label="$(gettext 'Desktop Preferences')">
49 <action name="Execute"><command>pcmanfm --desktop-pref</command></action>
50 </item>
51 <separator />
52 <item label="$(gettext 'Activate composite')">
53 <action name="Execute"><command>xcompmgr</command></action>
54 </item>
55 <item label="$(gettext 'Activate shadows')">
56 <action name="Execute"><command>xcompmgr -c -r 10 -o 0.5</command></action>
57 </item>
58 <item label="$(gettext 'Activate shadows/fade')">
59 <action name="Execute"><command>xcompmgr -c -f -r 10 -o 0.5</command></action>
60 </item>
61 <separator />
62 <item label="$(gettext 'Set opacity (actual)')">
63 <action name="Execute">
64 <command>transset-df --actual --max 60</command>
65 </action>
66 </item>
67 <item label="$(gettext 'Set opacity (click)')">
68 <action name="Execute">
69 <command>transset-df --click --max 60</command>
70 </action>
71 </item>
72 <separator />
73 <item label="$(gettext 'Stop effects')">
74 <action name="Execute"><command>killall xcompmgr</command></action>
75 </item>
76 </menu>
78 <!-- SliTaz Live (TazLiTo and TazUSB) -->
79 <menu id="slitaz-live-menu" label="$(gettext 'SliTaz Live')">
80 <item label="$(gettext 'TazLiTo LiveCD Tool')">
81 <action name="Execute"><command>tazbox su tazlito-wiz</command></action>
82 </item>
83 <item label="$(gettext 'TazUSB LiveUSB Tool')">
84 <action name="Execute"><command>tazbox su tazusb-box</command></action>
85 </item>
86 <separator />
87 <item label="$(gettext 'TazUSB Writefs (gzip)')">
88 <action name="Execute">
89 <command>tazbox su "terminal -e tazusb writefs gzip"</command>
90 </action>
91 </item>
92 <item label="$(gettext 'TazUSB Writefs (lzma)')">
93 <action name="Execute">
94 <command>tazbox su "terminal -e tazusb writefs lzma"</command>
95 </action>
96 </item>
97 <item label="$(gettext 'TazUSB Writefs (none)')">
98 <action name="Execute">
99 <command>tazbox su "terminal -e tazusb writefs none"</command>
100 </action>
101 </item>
102 </menu>
104 <!-- Openbox configuration -->
105 <menu id="openbox-menu" label="$(gettext 'Openbox')">
106 <item label="$(gettext 'ObConf')">
107 <action name="Execute"><command>obconf</command></action>
108 </item>
109 <item label="$(gettext 'Autostart Script')">
110 <action name="Execute">
111 <command>sh -c '\\
112 case \$XDG_CURRENT_DESKTOP in
113 openbox) echo n | cp -i \\
114 /etc/xdg/openbox/autostart ~/.config/openbox/autostart
115 editor ~/.config/openbox/autostart ;;
116 LXDE|*) usersauto="\$XDG_CONFIG_HOME/autostart"
117 [ -d \$usersauto ] || usersauto=''
118 pcmanfm -n /etc/xdg/autostart \$usersauto ;;
119 esac' </command>
120 </action>
121 </item>
122 <item label="$(gettext 'Openbox Menu')">
123 <action name="Execute">
124 <command>sh -c 'echo n | \\
125 cp -i /etc/xdg/openbox/menu.xml ~/.config/openbox/menu.xml;
126 editor ~/.config/openbox/menu.xml'
127 </command>
128 </action>
129 </item>
130 <separator />
131 <item label="$(gettext 'Reconfigure')">
132 <action name="Reconfigure" />
133 </item>
134 <item label="$(gettext 'Restart')">
135 <action name="Restart" />
136 </item>
137 </menu>
139 <menu id="root-menu" label="$(gettext 'Openbox 3')">
140 <!-- <separator label="$(gettext 'SliTaz Openbox')" /> -->
141 <item icon="/usr/share/icons/SliTaz/mimetypes/32/empty.png"
142 label="$(gettext 'Create a new file or folder')">
143 <action name="Execute"><command>tazbox new-file</command></action>
144 </item>
145 <item icon="/usr/share/icons/SliTaz/mimetypes/32/exec.png"
146 label="$(gettext 'Run application')">
147 <action name="Execute"><command>lxpanelctl run</command></action>
148 </item>
149 <separator />
150 <menu icon="/usr/share/icons/SliTaz/places/32/user-bookmarks.png"
151 id="favorites-menu" />
152 <!-- Pipe menu to open folder using GTK bookmarks -->
153 <menu icon="/usr/share/icons/SliTaz/places/32/folder-open.png"
154 id="open-folder-menu" execute="/usr/lib/openbox/open-folder-menu.sh"
155 label="$(gettext 'Open Folder')" />
156 <menu icon="/usr/share/icons/SliTaz/apps/22/desktop-effects.png"
157 id="desktop-effects" />
158 <menu icon="/usr/share/pixmaps/slitaz-icon.png"
159 id="slitaz-live-menu" />
160 <menu icon="/usr/share/pixmaps/openbox.png"
161 id="openbox-menu" />
162 <menu icon="/usr/share/icons/SliTaz/places/32/desktop.png"
163 id="client-list-menu" />
164 <separator />
165 <item icon="/usr/share/pixmaps/slitaz-logout.png" label="$(gettext 'Logout')">
166 <action name="Execute"><command>tazbox logout</command></action>
167 </item>
168 </menu>
170 </openbox_menu>
171 EOT