-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjgmenu-i18n.1.html
156 lines (140 loc) · 3.78 KB
/
jgmenu-i18n.1.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<!DOCTYPE html>
<html lang=en>
<head>
<title>jgmenu</title>
<meta charset="utf-8" />
<meta name="description" content="jgmenu"/>
<meta name="viewport" content="width=device-width">
<style>
body {
overflow-y: scroll;
font-family: monospace;
background-color: #fff;
color: black;
max-width: 600px;
padding: 20px;
line-height: 1.5;
word-wrap: break-word;
margin: auto;
}
pre {
padding: 20px;
white-space: pre-wrap;
border: 1px dotted gray;
display: block;
margin: 20px auto;
background-color: #eee;
color: #111;
}
code {
font-family: monospace;
background-color: #eee;
color: #111;
}
img {
margin: 20px auto;
max-width: 100%;
}
table {
border-collapse: collapse;
}
table,th,td {
border: 1px solid black;
}
th,td {
padding: 15px;
text-align: left;
}
h1 a, h2 a, h3 a, h4 a, h5 a {
text-decoration: none;
}
h1, h2, h3, h4, h5 {
font-family: monospace;
font-weight: bold;
}
h1 {
font-size: 130%;
}
h2 {
font-size: 110%;
}
h3 {
font-size: 95%;
}
h4 {
font-size: 90%;
font-style: italic;
}
h5 {
font-size: 90%;
font-style: italic;
}
dt code {
font-weight: bold;
}
dd p {
margin-top: 0;
}
</style>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-162822348-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-162822348-1');
</script>
</head>
<body>
<main>
<a href='index.html'>Home</a><br> JGMENU-I18N(1)<h1 id="name">NAME</h1>
<p>jgmenu-i18n - support translation of jgmenu flavoured CSV menu
data</p>
<h1 id="synopsis">SYNOPSIS</h1>
<p>jgmenu_run i18n <<em>translation-file</em>></p>
<p>jgmenu_run i18n --init [<<em>translation-file</em>>]</p>
<h1 id="description">DESCRIPTION</h1>
<p><code>jgmenu_run i18n</code> reads jgmenu flavoured CSV menu data
from stdin and either translates it, or creates a po style translation
file</p>
<p>The <<em>translation-file</em>> argument can be a file or
directory. If it is the latter, translation files will be searched for
in this directory based on the environment variable $LANG, which will be
assumed to be in the format <code>ll_CC.UTF8</code> where
<code>ll</code> is an ISO 639 two-letter language code and
<code>CC</code> is an ISO 3166 two-letter country code. Files named
<code>ll_CC</code> and <code>ll</code> will be used in said order.</p>
<h1 id="options">OPTIONS</h1>
<dl>
<dt><code>--init</code></dt>
<dd>
<p>Create a template po style translation file with blank msgid
entries</p>
</dd>
</dl>
<h1 id="examples">EXAMPLES</h1>
<h2 id="create-translation-file-template-for-manual-translation">Create
translation file template for manual translation</h2>
<p>Modules jgmenu-apps(1) and jgmenu-ob(1) have built-in i18n support.
In order to use this features, a translation file is required. Here
follow examples of how a translation file can be created:</p>
<p>Example 1.</p>
<pre><code>jgmenu_run ob | jgmenu_run i18n --init >sv</code></pre>
<p>Example 2.</p>
<pre><code>jgmenu_run i18n --init <prepend.csv >sv</code></pre>
<p>The result of the above commands would be a skeleton translation file
(<code>sv</code> in this case) containing entries like this:</p>
<pre><code>msgid "Web Browser"
msgstr ""</code></pre>
<p>Manually translate the empty msgstr fields.</p>
<h2 id="use-translation-file">Use translation file</h2>
<p>If using modules jgmenu-apps(1) or jgmenu-ob(1), just set
<code>csv_i18n</code> in jgmenurc to directly point to a
translation-file or a directory containing translation files.</p>
<p>In special circumstances, you may wish to include i18n in command
plumbing. Here follow an example of how this could be constructed:</p>
<pre><code><csv-generating-command> \
| jgmenu_run i18n <translation-file> \
| jgmenu --vsimple</code></pre>
</main>
</body>
</html>