Skip to content

Commit 329e478

Browse files
committed
Migrate Internationalization How_to_add_things_to_the_Eclipse_doc to
markdown Also fixes a link in Eclipse_Doc_Style_Guide
1 parent d0d62dd commit 329e478

File tree

3 files changed

+112
-2
lines changed

3 files changed

+112
-2
lines changed

docs/Eclipse_Doc_Style_Guide.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,4 @@ Contents
9595
| --- | --- |
9696
| Eclipse indexes its help files by looking at the text in the page and weighting titles over paragraphs. However, there can be times when you want the index to show text that does not display on the page. For example, if Eclipse uses its own terminology for a function, you might want users to be able to look up synonyms. To have the Eclipse index generate a hit for "autosave" (a function that Eclipse has under another name) add a meta "keywords" tag before the </head> tag. | <meta name="keywords" content="autosave"> |
9797

98-
* * *
99-
Back to [Eclipse Documentation](/Eclipse_Documentation "Eclipse Documentation")
10098

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
How to add things to the Eclipse doc
2+
====================================
3+
4+
Contents
5+
--------
6+
7+
* [1 Adding new plug-ins and dependencies](#Adding-new-plug-ins-and-dependencies)
8+
* [2 Adding new API packages](#Adding-new-API-packages)
9+
* [3 Adding new extension points](#Adding-new-extension-points)
10+
* [4 JDT and PDE docs](#JDT-and-PDE-docs)
11+
* [5 Missing API docs](#Missing-API-docs)
12+
13+
Adding new plug-ins and dependencies
14+
------------------------------------
15+
16+
To add new plug-ins and plug-in dependencies, you need to make changes in several places in the org.eclipse.platform.doc.isv plug-in (which is located in the eclipse.platform.common Git repository):
17+
18+
1. platformOptions.txt
19+
* the plug-in's source folder(s) must be included on the -sourcepath
20+
* remember to remove the plug-in from -classpath if it was already there
21+
* code of required plug-ins must be added on the -classpath (unless they are already on the -sourcepath)
22+
* non-JARed plug-ins: Path(s) to the JAR(s)
23+
* JARed plug-ins: <plugin>/@dot
24+
* plug-ins not built during the platform build: path to the built JAR
25+
**Caveat:** the JAR name typically contains a version:
26+
* Either remember to update the version in the reference whenever a new version is used
27+
* Or (since 3.8 incl. maintenance branches) replace the `_<major>.<minor>.<service>.<qualifier>` with `_*` if only one version of the JAR is present during the build.
28+
* the API package names must be included in the (alphabetical) package list at the end of the file
29+
* variables like `${eclipse.platform.resources.bundles}` are resolved from `cbi_basedirs.properties` (and `pde_basedirs.properties` for the old PDE-based build)
30+
2. buildDoc.xml
31+
* If a plug-in contributes extension points, it should be added to the list of plug-ins in the <convertSchemaToHTML> task in the buildDoc.xml of the corresponding documentation plug-in.
32+
3. plugin.xml
33+
* If your plugin has Javadoc API, add a line to plugin.xml under the org.eclipse.pde.core.javadoc extension to associate your plug-in's Javadoc with the reference section for this doc plug-in.
34+
35+
Adding new API packages
36+
-----------------------
37+
38+
1. package.html
39+
* Create a package.html or package-info.java file for your API package, and place it in the package alongside the source code
40+
2. topics_Reference.xml
41+
* add a line for each API package
42+
3. reference/misc/overview-platform.html
43+
* add the API packages to the corresponding section
44+
4. platformOptions.txt
45+
* the API package names must be included in the (alphabetical) package list at the end of the file
46+
47+
Adding new extension points
48+
---------------------------
49+
50+
1. reference/extension-points/index.html
51+
* add a line for each extension point
52+
2. topics_Reference.xml
53+
* add a line for each extension point
54+
55+
JDT and PDE docs
56+
----------------
57+
58+
For org.eclipse.jdt.doc.isv, the process is the same with these file location differences:
59+
60+
* platformOptions.txt -> jdtOptions.txt
61+
* overview-platform.html -> /reference/misc/overview-jdt.html
62+
63+
For org.eclipse.pde.doc.user, the process is the same with these file location differences:
64+
65+
* platformOptions.txt -> pdeOptions.txt
66+
* overview-platform.html -> /reference/misc/overview-pde.html
67+
68+
Missing API docs
69+
----------------
70+
71+
org.eclipse.ua.tests.doc has an ApiDocTest that can help you detect missing API docs. The output generated by the test can be found in the Console Output Log, e.g.: [http://download.eclipse.org/eclipse/downloads/drops4/R-4.6.2-201611241400/testresults/ep46M-unit-mac64\_macosx.cocoa.x86\_64_8.0/org.eclipse.ua.tests.doc.AllTests.txt](http://download.eclipse.org/eclipse/downloads/drops4/R-4.6.2-201611241400/testresults/ep46M-unit-mac64_macosx.cocoa.x86_64_8.0/org.eclipse.ua.tests.doc.AllTests.txt)
72+
73+

docs/Internationalization.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
3+
Internationalization
4+
====================
5+
6+
This page is a hub for resources relating to preparing Eclipse for use in other languages and locales (also known by the abbreviation [i18n](s://en.wikipedia.org/wiki/I18n)).
7+
This work involves translating strings into other languages (often called NLS for Natural Language Support), handling bi-directional text (BIDI), and preparing content such as dates and times in a format appropriate for a given locale.
8+
9+
Tools Used
10+
----------
11+
12+
Some Eclipse plug-ins use ICU4J APIs when working with locale-specific content.
13+
14+
Most Eclipse plug-ins use a special [Eclipse message bundle](http://www.eclipse.org/eclipse/platform-core/documents/3.1/message_bundles.html) mechanism for working with translated strings. This mechanism uses traditional Java message.properties files, but without using String-based keys. This has much better memory usage characteristics than traditional approaches.
15+
16+
Bidi
17+
----
18+
19+
For Bidirectional locales, like Arabic and Hebrew, some new Bidi-specific APIs were added to Eclipse 3.2 that inject directional markers into strings with implicit left-to-right meaning (such as file paths and URLs) in order to render them properly when the text is mixed. This was a necessary due to an apparent bug in rendering these strings containing mixed text on Windows. The problem appears more frequently on Windows platforms (vs Linux), but has also been found to occur on Linux in certain cases. See the Unicode [Bidirectional algorithm](http://www.unicode.org/reports/tr9/) for the specifics on how strings are normally rendered in bidirectional locales.
20+
21+
When to externalize strings
22+
---------------------------
23+
24+
Generally speaking, there are two possible audiences for a message string in your code: Eclipse plug-in programmers or end users. Messages directed at end users should be translated. Messages for the developers of the plug-in in question should not be translated. This is because the plug-in programmer likely does not understand the language being used by any given end user. If the user reports a problem and provides data such as their error log, the programmer needs to be able to understand that information. Similarly, the programmer may be running tests on different locales where they don't understand the end user strings, but need to understand error and tracing information being produced while running in that locale. Since all plug-in documentation and the code itself is written in English, it is assumed that the plug-in developers are able to understand English programming messages.
25+
26+
The following are specific examples of strings that **should** be translated:
27+
28+
* Messages appearing in the GUI (editors, views, dialogs, etc).
29+
* Messages explicitly returned by programmatic API (IStatus messages, messages in checked exceptions, etc)
30+
* Messages printed to the console by command line tools directed at end users
31+
* Messages in Ant tasks
32+
33+
The following are specific examples of strings that should **not** be translated:
34+
35+
* Messages that only ever go to the log
36+
* Debugging trace messages (such as those managed by the Equinox DebugOptions, and DebugTrace API), or other strings printed to stderr
37+
* Messages in unchecked exceptions (RuntimeException or Error)
38+
39+

0 commit comments

Comments
 (0)