forked from coddec/Classic-Shell
- Notifications
You must be signed in to change notification settings - Fork 452
/
Copy pathLocalization.rtf
108 lines (84 loc) · 8.8 KB
/
Localization.rtf
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
{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fprq2\fcharset0 Cambria;}{\f1\fswiss\fprq2\fcharset0 Arial;}{\f2\fnil\fcharset2 Symbol;}}
{\colortbl ;\red0\green0\blue255;}
{\*\listtable
{\list\listhybrid
{\listlevel\levelnfc23\leveljc0\levelstartat1{\leveltext\'01\'B7;}{\levelnumbers;}\f2\jclisttab\tx0}
{\listlevel\levelnfc23\leveljc0\levelstartat1{\leveltext\'01\'B7;}{\levelnumbers;}\f2\jclisttab\tx0}\listid1}}
{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
{\stylesheet{ Normal;}{\s1 heading 1;}{\s2 heading 2;}}
{\*\generator Riched20 10.0.17134}{\*\mmathPr\mnaryLim0\mdispDef1\mwrapIndent1440}\viewkind4\uc1
\pard\keepn\widctlpar\s1\sb240\sa60\sl276\slmult1\kerning32\b\f0\fs32 Localization of Open-Shell\par
\pard\nowidctlpar\kerning0\b0\f1\fs20\par
This file explains the localization system used by Open-Shell and how to translate Open-Shell in new languages.\par
\par
\pard\keepn\widctlpar\s2\sb240\sa60\sl276\slmult1\b\i\f0\fs28 1. What can be localized\par
\pard\nowidctlpar\b0\i0\f1\fs20\par
Open-Shell has 2 major systems for providing localized text.\par
\par
The first one is the L10N.ini files. There are 3 files \endash ExplorerL10N.ini, StartMenuL10N.ini and StartMenuHelperL10N.ini. They contain translations for the text in Explorer and the start menu that users will encounter during normal use. These files contain translations for all of the 35 supported languages. Each language is separated in its own section. You will generally not need to edit these files unless you find a typo. If you do, please send the correction to {{\field{\*\fldinst{HYPERLINK "mailto:classicshell@ibeltchev.com" }}{\fldrslt{\ul\cf1\cf1\ul classicshell@ibeltchev.com}}}}\f1\fs20 , so I can fix the typo in the next release.\par
\par
The second system is for localizing the settings UI and the system messages that Open-Shell displays. The translations are packaged into a resource DLL with the name of the language \endash en-US.dll, ja-JP.dll, etc. The DLL can contain:\par
\pard{\pntext\f2\'B7\tab}{\*\pn\pnlvlblt\pnf2\pnindent0{\pntxtb\'B7}}\nowidctlpar\fi-360\li720 A string table with replacement strings\par
{\pntext\f2\'B7\tab}Dialog resources for the Settings UI\par
{\pntext\f2\'B7\tab}Overrides for text lines in the L10N.ini files\par
\pard\nowidctlpar\par
The same DLL contains resources for all of the Open-Shell components \endash Classic Explorer, Open-Shell Menu, etc. Generally resources from 2000 to 3000 belong to Classic Explorer, from 3000 to 4000 belong to Open-Shell Menu, from 5000 to 6000 belong to Classic IE, 6000 to 7000 belong to the updater component and from 4000 to 5000 are shared by all components.\par
\par
\pard\keepn\widctlpar\s2\sb240\sa60\sl276\slmult1\b\i\f0\fs28 2. What else can be localized (if you really want to)\par
\pard\nowidctlpar\b0\i0\f1\fs20\par
Open-Shell is designed to support only localizations for the UI. Localizations for other areas, like the installer and the documentation will require more work.\par
\par
To translate the installer you need to translate the OpenShellText-en-US.wxl file. It contain the text for the installer. One benefit of translating the installer is that you can localize the names of the shortcuts in the Start menu.\par
\par
To translate the help file you will need to install some tool for editing CHM files like HTML Help Workshop from Microsoft. Decompile the OpenShell.chm file and translate the HTML files.\par
\par
You also need to translate the OpenShellReadme.rtf file and OpenShellEULA.rtf.\par
\par
When you are done, send all translations to me and I will prepare an installer for that language. \par
\par
\par
\pard\keepn\widctlpar\s2\sb240\sa60\sl276\slmult1\b\i\f0\fs28 3. The DLL structure in detail\par
\pard\nowidctlpar\b0\i0\f1\fs20\par
Look at the provided \b en-US.dll\b0 file. It contains all English resources that can be translated.\par
\b\i Note:\b0 Open-Shell doesn\rquote t need the en-US.dll file. The English text is already built-in. The purpose of the en-US.dll file is to serve as an example and starting point for other languages.\par
\i0\par
The localization DLL contains the following resources:\par
\par
\pard{\pntext\f2\'B7\tab}{\*\pn\pnlvlblt\pnf2\pnindent0{\pntxtb\'B7}}\nowidctlpar\fi-360\li720 A version resource. It must match the version of Open-Shell it is intended to be used with. The reason is that the text often changes between versions, so translations from one version will not work with the next. You may also use the comments section to list your name as the author.\par
\pard\nowidctlpar\li720\par
\pard{\pntext\f2\'B7\tab}{\*\pn\pnlvlblt\pnf2\pnindent0{\pntxtb\'B7}}\nowidctlpar\fi-360\li720 A string table. Provides translations for the UI text in Open-Shell. Use the text from en-US.dll as a source. The string table doesn\rquote t need to include all strings. If a string is missing, it will stay in English.\line\par
{\pntext\f2\'B7\tab}A set of dialog resources. These are the dialog boxes that the Settings UI needs. You can replace the text in the dialogs with your own. You can also resize some of the dialog elements to make the text fit. Like with the strings, if a dialog is missing from the DLL, the English version will be used.\line\par
{\pntext\f2\'B7\tab}A L10N resource (its resource ID must be 1). This is a UTF-16 text file that contains replacement strings for the ini files. For example the ini files do not have the text \ldblquote Settings for Open-Shell Menu\rdblquote translated in all languages (since I don\rquote t know how to say it in all 35 languages). So the DLL can provide the translations for the current language. It is possible to replace even text that is already translated \endash for example if you want to fix a typo in the ini file, or to provide a better version of some text line.\line\par
\pard\widctlpar\sa200\sl276\slmult1 You can edit a DLL using a resource editor like Visual Studio, Res Hacker, and many others.\par
\pard\keepn\widctlpar\s2\sb240\sa60\sl276\slmult1\b\i\f0\fs28 4. What if I don\rquote t know how to edit DLLs?\par
\pard\nowidctlpar\b0\i0\f1\fs20\par
Look at the provided \b en-US.csv\b0 file. It is a tab-separated file in UTF-16 format. You can open it in Excel or any compatible editor. The file contains 4 columns:\par
\pard
{\listtext\f1\u10625?\tab}\ls1\nowidctlpar\fi-360\li720\b ID\b0\endash this is the identifier of the text line. There are 3 types of IDs:\par
\pard
{\listtext\f1\u10625?\tab}\ls1\ilvl1\nowidctlpar\fi-360\li1440 A number, like 2001, 4030, etc. These correspond to the strings in the string table\par
{\listtext\f1 1\tab}A pair of numbers, like 3002/1025. These correspond to strings found in the dialog boxes. The first number is the ID of the dialog, and the second is the ID of the control in that dialog\par
{\listtext\f1 2\tab}Text, like \ldblquote Menu.SettingsTip\rdblquote . These correspond to the lines of the L10N resource\par
\pard\nowidctlpar\li720\par
\pard{\pntext\f2\'B7\tab}{\*\pn\pnlvlblt\pnf2\pnindent0{\pntxtb\'B7}}\nowidctlpar\fi-360\li720\b English\b0\endash this is the original English text\par
\pard\nowidctlpar\li720\par
\pard{\pntext\f2\'B7\tab}{\*\pn\pnlvlblt\pnf2\pnindent0{\pntxtb\'B7}}\nowidctlpar\fi-360\li720\b Translation\b0\endash this column is empty. That\rquote s where you will have to enter the translations for your language\line\par
{\pntext\f2\'B7\tab}\b Comment\b0\endash some lines contain hints for the meaning of the translation, or instructions for providing better translation. If you are still unclear about something, ask me. I will provide more comments in future versions based on which text lines people find confusing\par
\pard\nowidctlpar\par
\par
Once you are done, send the CSV file to {{\field{\*\fldinst{HYPERLINK "mailto:classicshell@ibeltchev.com" }}{\fldrslt{\ul\cf1\cf1\ul classicshell@ibeltchev.com}}}}\f1\fs20 and I will convert that text into a DLL and upload it to the Open-Shell website.\par
\par
\pard\keepn\widctlpar\s2\sb240\sa60\sl276\slmult1\b\i\f0\fs28 5. Special characters\par
\pard\nowidctlpar\b0\i0\f1\fs20\par
Some text lines in the DLL or the CSV contain special characters. They are:\par
\b\\t\b0\endash this is the Tab character. Do not enter an actual tab in the text, because the CSVs don\rquote t handle it well\par
\b\\r\b0\endash this is a carriage return character\par
\b\\n\b0\endash this is a new line character\par
\b\\\\\b0 - this is the backslash character. You must use \\\\ instead of \\, because a single \\ can be mistaken for a special character\par
\b %d\b0\endash this is a placeholder for a number. The actual number will be provided at run-time\par
\b %s\b0\endash this is a placeholder for a string. The actual string will be provided at run-time\par
\par
In general, try to keep the special characters as they are.\par
\par
}