summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Studio/English.lproj/Strings/StringsReadme.htm
blob: 78dec4f17c46201e87dab8afa3a8a7334dab797a (plain)
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
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Studio String Files</title>
</head>

<body>

<h2>Studio String Files</h2>
<p>The directory Studio\English.lproj\Strings contain files that help manage the
following ideas:</p>
<ul>
  <li>the text strings displayed in Studio's user interface and how they are
  mapped onto integer-based identifiers in the C++ source code</li>
  <li>the process of internationalization (or localization) of the GUI and the
  strings that are displayed in non-English versions of Studio</li>
</ul>
<p>This document provides an overview of the various files and how they are
used.</p>
<address align="right">
  Paul Tweedlie, January 27 2005</address>
<h3>Compile.py</h3>
<p>The Python script 'compile.py' takes the 2 input files (stri) and generates
the 2 output files (stro) and a C++ header file 'Strings.h'. The 2 stri input
files are ASCII-based and are typically edited by code developers while adding
new GUI and functionality. The 2 stro files generated by the script are 16-bit
Unicode-based files that are designed to be language-independent, see
<a href="http://www.unicode.org/">http://www.unicode.org/</a>. The 2 stro files
form part of the Studio release and are loaded by Studio.exe on start-up. They
are installed on a user's machine in the directory:</p>
<p>&nbsp;&nbsp;&nbsp; C:\Program Files\Qt 3D Studio\res\Strings</p>
<p>The stro files may be edited at the end of a development cycle to localize
Studio's GUI from English to another language that may use a different script,
e.g. Japanese.</p>
<p>To run the compile.py script, you need a Python interpreter installed on your
machine, get one from <a href="http://www.python.org/">http://www.python.org/</a>.
The typical steps for a code developer are:</p>
<ol>
  <li>Check out the input files <i>and</i> the output files before running the
  script. It's easiest to just check out the entire Strings directory using
  Perforce.</li>
  <li>Make your text changes to the stri file(s)</li>
  <li>Run the compile.py script</li>
  <li>Build Studio and verify your changes</li>
  <li>Go to Perforce and revert unchanged files in the Strings directory</li>
  <li>Check in the Strings directory back into Perforce</li>
</ol>
<h3>Strings.h</h3>
<p>The C++ header file 'Strings.h' is auto-generated and should never be hand
edited. The file contains a bunch of #define statements that set up constant
identifiers where each identifier is assigned a unique integer. For example,</p>
<p>&nbsp;&nbsp;&nbsp; #define IDS_CONTEXT_SLIDE_NEW 570</p>
<h3>Stri: ASCII Input Files</h3>
<div align="center">
  <center>
  <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="90%" id="AutoNumber1">
    <tr>
      <td width="15%">Static.stri</td>
      <td width="85%">An ASCII text file that specifies the strings that are
      displayed in Studio's user interface such as buttons and tooltips. The
      file is organized as a mapping of pairs <b>from</b> integer-based
      identifiers that are referenced in the C++ source code<b> to</b> text
      strings. For example, the mapping for the 'New Slide' button appears as:<p>&nbsp;&nbsp;&nbsp;
      &lt;string name=&quot;IDS_CONTEXT_SLIDE_NEW&quot; value=&quot;New Slide&quot; /&gt;</p>
      <p>where the integer identifier 'IDS_CONTEXT_SLIDE_NEW' is used in the
      source file SlideContextMenu.cpp and 'New Slide' is the text that appears
      in the list of options when the user right-clicks in the Slide palette.
      </p>
      <p>Developers should edit this file when writing new GUI code, e.g. adding
      new buttons.</td>
    </tr>
  </table>
  </center>
</div>
<h3>Stro: Unicode Output Files</h3>
<div align="center">
  <center>
  <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="90%" id="AutoNumber1">
    <tr>
      <td width="15%">Static.stro</td>
      <td width="85%">A Unicode file that specifies the strings that are
      displayed in Studio's user interface such as buttons and tooltips. The
      file is organized into a list of triples: an identifier, a numeric value,
      and a Unicode string. For example, the triple representing the 'New Slide'
      button appears as:<p>&nbsp;&nbsp;&nbsp; &lt;string name=&quot;IDS_CONTEXT_SLIDE_NEW&quot;
      ID=&quot;570&quot; value=&quot;New Slide&quot;/&gt;. </p>
      <p>Language translators should edit the 'value' strings in this file. For
      example, the above triple may be translated as follows:</p>
      <p>&nbsp;&nbsp; &lt;string name=&quot;IDS_CONTEXT_SLIDE_NEW&quot; ID=&quot;570&quot;
      value=&quot;Nouveau Slide&quot;/&gt;. </td>
    </tr>
  </table>
  </center>
</div>
<h3>Localization</h3>
<p>Studio's user interface uses the Arial font by default and a point side of
13pt. If you want to change the GUI's font and/or the point size, you should
search in the Static.stro file for the following identifiers:</p>
<p>&nbsp;&nbsp; &lt;string name=&quot;IDS_STUDIOFONT_FACE&quot; ID=&quot;548&quot; value=&quot;Arial&quot;/&gt;</p>
<p>&nbsp;&nbsp; &lt;string name=&quot;IDS_STUDIOFONT_SIZE&quot; ID=&quot;547&quot; value=&quot;13&quot;</p>
<p>If you want to use a font that supports non-English characters, for instance
Japanese symbols, you should first change the 'Arial' font to something like
'Arial Unicode MS'. For example,</p>
<p>&nbsp;&nbsp; &lt;string name=&quot;IDS_STUDIOFONT_FACE&quot; ID=&quot;548&quot; value=&quot;Arial Unicode
MS&quot;/&gt;</p>
<p>Next you substitute all the English strings in the stro files for their
Japanese-translated counterparts. You will need to use an editor such as Notepad
or Wordpad that supports the Unicode format. For example, perhaps the 'New
Slide' option is translated so:</p>
<p>&nbsp;&nbsp; &lt;string name=&quot;IDS_CONTEXT_SLIDE_NEW&quot; ID=&quot;570&quot; value=&quot;&#12461;&#12515;&#12483;&#12471;&#12531;&quot;/&gt;.
</p>
<p>Note from Gim Guan Chua: To see the Japanese symbols in Studio, you may have
to set your machine to Japanese settings (in Control Panel-&gt;Regional and
Language Settings-&gt;Advance). Studio is considered a &quot;non-Unicode&quot; program in
contrast to Notepad and Wordpad which are Unicode-aware in XP.</p>
<p>&nbsp;</p>

</body>

</html>