(メッセージはありません)
@@ -883,6 +883,7 @@ | ||
883 | 883 | </pointCut> |
884 | 884 | |
885 | 885 | <!-- ヘルプ翻訳 (before・第 1 引数) InputStream 2008.12.28 --> |
886 | + <!-- 不完全なため廃止 2009.09.10 | |
886 | 887 | <pointCut editPoint="execution" timing="before"> |
887 | 888 | <advice><![CDATA[ |
888 | 889 | $1 = ?{translation.class}.translateHelp($1, null); |
@@ -890,11 +891,8 @@ | ||
890 | 891 | |
891 | 892 | <jointPoint className="org.eclipse.help.internal.webapp.servlet.EclipseConnector" methodName="transferContent"/> |
892 | 893 | |
893 | - <!-- 検索インデックス | |
894 | - org.eclipse.help.internal.search.HTMLDocParser | |
895 | - --> | |
896 | - | |
897 | 894 | </pointCut> |
895 | + --> | |
898 | 896 | |
899 | 897 | <!-- ***** メニュー関連 ***** --> |
900 | 898 | <!-- メニュー項目の翻訳 (アクセラレーターのサポート) --> |
@@ -1,217 +0,0 @@ | ||
1 | -/* | |
2 | - * Copyright (c) 2005- Shinji Kashihara. | |
3 | - * All rights reserved. This program are made available under | |
4 | - * the terms of the Eclipse Public License v1.0 which accompanies | |
5 | - * this distribution, and is available at epl-v10.html. | |
6 | - */ | |
7 | -package jp.sourceforge.mergedoc.pleiades.resource; | |
8 | - | |
9 | -import java.io.File; | |
10 | -import java.io.FileInputStream; | |
11 | -import java.io.FileNotFoundException; | |
12 | -import java.io.FileOutputStream; | |
13 | -import java.io.IOException; | |
14 | -import java.io.InputStream; | |
15 | -import java.io.OutputStream; | |
16 | -import java.util.LinkedList; | |
17 | -import java.util.List; | |
18 | - | |
19 | -import jp.sourceforge.mergedoc.pleiades.generator.nls.HelpExtractor; | |
20 | -import jp.sourceforge.mergedoc.pleiades.generator.nls.HtmlFragmentList; | |
21 | -import jp.sourceforge.mergedoc.pleiades.resource.HelpHtmlParser.HtmlFragment; | |
22 | -import junit.framework.TestCase; | |
23 | - | |
24 | -import org.apache.commons.io.FileUtils; | |
25 | -import org.apache.commons.io.IOUtils; | |
26 | - | |
27 | -/** | |
28 | - * HTML パーサー・テスト・クラスです。 | |
29 | - * <p> | |
30 | - * @author cypher256 | |
31 | - */ | |
32 | -public class HelpHtmlParserTest extends TestCase implements FileNames { | |
33 | - | |
34 | - /** 日本語 HTML 文字セット */ | |
35 | - private static final String JA_HTML_CHARSET = "UTF-8"; | |
36 | - | |
37 | - /** 辞書 */ | |
38 | - private static final TranslationDictionary dic = new TranslationDictionary(); | |
39 | - | |
40 | - /** ルート・ディレクトリー */ | |
41 | - private static File ROOT_DIR; | |
42 | - | |
43 | - /** 入力ストリーム・リスト */ | |
44 | - private List<InputStream> isList = new LinkedList<InputStream>(); | |
45 | - | |
46 | - /** | |
47 | - * コンストラクタ | |
48 | - * @throws IOException | |
49 | - */ | |
50 | - public HelpHtmlParserTest() throws IOException { | |
51 | - | |
52 | - String path = HelpHtmlParserTest.class.getName().replace(".", "/") + ".class"; | |
53 | - ClassLoader loader = Thread.currentThread().getContextClassLoader(); | |
54 | - File pathDir = new File(loader.getResource(path).getPath()).getParentFile(); | |
55 | - ROOT_DIR = new File(pathDir.getCanonicalPath().replace("bintest", "srctest")); | |
56 | - } | |
57 | - | |
58 | - /** | |
59 | - * テスト前処理 | |
60 | - */ | |
61 | - @Override | |
62 | - protected void setUp() throws Exception { | |
63 | - } | |
64 | - | |
65 | - /** | |
66 | - * テスト後処理 | |
67 | - */ | |
68 | - @Override | |
69 | - protected void tearDown() throws Exception { | |
70 | - for (InputStream is : isList) { | |
71 | - IOUtils.closeQuietly(is); | |
72 | - } | |
73 | - } | |
74 | - | |
75 | - /** | |
76 | - * ファイル取得 | |
77 | - * @param name | |
78 | - * @return | |
79 | - */ | |
80 | - private File getFile(String name) { | |
81 | - return new File(ROOT_DIR, name); | |
82 | - } | |
83 | - | |
84 | - /** | |
85 | - * 入力ストリーム取得 | |
86 | - * @param name | |
87 | - * @return 入力ストリーム | |
88 | - * @throws FileNotFoundException | |
89 | - */ | |
90 | - private InputStream getInputStream(String name) throws FileNotFoundException { | |
91 | - File file = getFile(name); | |
92 | - if (!file.exists()) { | |
93 | - fail("リソースが見つかりません。" + file.getPath()); | |
94 | - } | |
95 | - return new FileInputStream(file); | |
96 | - } | |
97 | - | |
98 | - /** | |
99 | - * 日本語 HTML 書込み | |
100 | - * @param parser | |
101 | - * @param targetDir | |
102 | - * @return | |
103 | - * @throws Exception | |
104 | - */ | |
105 | - private String writeJaActualHtml(HelpHtmlParser parser, String targetDir) throws Exception { | |
106 | - | |
107 | - String jaHtml = IOUtils.toString(parser.getInputStream(), JA_HTML_CHARSET); | |
108 | - File dir = getFile(targetDir + "/en.html").getParentFile(); | |
109 | - OutputStream os = new FileOutputStream(new File(dir, "ja_actual.html")); | |
110 | - IOUtils.write(jaHtml, os, JA_HTML_CHARSET); | |
111 | - os.close(); | |
112 | - return jaHtml; | |
113 | - } | |
114 | - | |
115 | - /** | |
116 | - * テスト実行 | |
117 | - * @param targetDir | |
118 | - * @param isLogOut ログ出力する場合は true | |
119 | - * @throws Exception | |
120 | - */ | |
121 | - private PropertySet doTestLoad(String targetDir, boolean isLogOut) | |
122 | - throws FileNotFoundException { | |
123 | - | |
124 | - // 英語リソース抽出 | |
125 | - String enPath = targetDir + "/en.html"; | |
126 | - HtmlFragmentList enList = new HtmlFragmentList(enPath); | |
127 | - for (HtmlFragment f : new HelpHtmlParser(getInputStream(enPath))) { | |
128 | - enList.add(f); | |
129 | - } | |
130 | - // 日本語リソース抽出 | |
131 | - String jaPath = targetDir + "/ja.html"; | |
132 | - HtmlFragmentList jaList = new HtmlFragmentList(jaPath); | |
133 | - for (HtmlFragment f : new HelpHtmlParser(getInputStream(jaPath))) { | |
134 | - jaList.add(f); | |
135 | - } | |
136 | - String msg = new HelpExtractor().optimizeListSize(enList, jaList); | |
137 | - if (isLogOut) { | |
138 | - System.out.println(msg); | |
139 | - } | |
140 | - | |
141 | - // プロパティー作成 | |
142 | - PropertySet actualProp = new PropertySet(); | |
143 | - for (int i = 0; i < Math.max(enList.size(), jaList.size()); i++) { | |
144 | - | |
145 | - HtmlFragment en = i < enList.size() ? enList.get(i) : null; | |
146 | - HtmlFragment ja = i < jaList.size() ? jaList.get(i) : null; | |
147 | - String enText = en == null ? "" : en.getText(); | |
148 | - String jaText = ja == null ? "" : ja.getText(); | |
149 | - | |
150 | - // 確認用のログ出力 | |
151 | - if (isLogOut) { | |
152 | - System.out.println("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"); | |
153 | - System.out.println(en); | |
154 | - System.out.println("──────────────"); | |
155 | - System.out.println(ja); | |
156 | - System.out.println("──────────────"); | |
157 | - String jaDic = dic.lookup(enText).getValue(); | |
158 | - System.out.println("id" + i + ":辞書" + (jaDic.equals(jaText) ? "○" : "●") + "| " + jaDic); | |
159 | - } | |
160 | - | |
161 | - actualProp.put(enText, jaText); | |
162 | - } | |
163 | - assertEquals(enList.size(), jaList.size()); | |
164 | - | |
165 | - return actualProp; | |
166 | - } | |
167 | - | |
168 | - /** | |
169 | - * テスト実行 | |
170 | - * @param targetDir | |
171 | - * @param isLogOut ログ出力する場合は true | |
172 | - * @throws Exception | |
173 | - */ | |
174 | - private void doTest(String targetDir, boolean isLogOut) throws Exception { | |
175 | - | |
176 | - PropertySet actualProp = doTestLoad(targetDir, isLogOut); | |
177 | - File transPropFile = getFile(targetDir + "/trans.properties"); | |
178 | - actualProp.store(transPropFile, "JUnit テスト結果プロパティー"); | |
179 | - | |
180 | - // HTML の検証 | |
181 | - HelpHtmlParser parser = new HelpHtmlParser(getInputStream(targetDir + "/en.html")); | |
182 | - for (HtmlFragment f : parser) { | |
183 | - String en = f.getText(); | |
184 | - String ja = dic.lookupHelp(en).getValue(); | |
185 | - f.setText(ja); | |
186 | - } | |
187 | - String jaHtml = writeJaActualHtml(parser, targetDir); | |
188 | - String expected = FileUtils.readFileToString(getFile(targetDir + "/ja_expected.html"), JA_HTML_CHARSET); | |
189 | - assertEquals(expected, jaHtml); | |
190 | - } | |
191 | - | |
192 | - /** | |
193 | - * テスト | |
194 | - * @throws Exception | |
195 | - */ | |
196 | - public void test311a() throws Exception { | |
197 | - | |
198 | - doTest("3.1.1a/org.eclipse.jdt.doc.isv_3.1.1/jdt_api_options", false); | |
199 | - doTest("3.1.1a/org.eclipse.platform.doc.user_3.1.1/whatsNew/platform_whatsnew", false); | |
200 | - } | |
201 | - | |
202 | - /** | |
203 | - * テスト | |
204 | - * @throws Exception | |
205 | - */ | |
206 | - public void test321() throws Exception { | |
207 | - | |
208 | - doTest("3.2.1/org.eclipse.help.base/help_home", false); | |
209 | - doTest("3.2.1/org.eclipse.platform.doc.user/gettingStarted/qs-02a", false); | |
210 | - | |
211 | - doTestLoad("3.2.1/org.eclipse.platform.doc.user/_countTest/ref-19cvs", false); | |
212 | - doTestLoad("3.2.1/org.eclipse.platform.doc.user/_countTest/ref-19cvs-password", false); | |
213 | - doTestLoad("3.2.1/org.eclipse.platform.doc.user/_countTest/cprbview", false); | |
214 | - doTestLoad("3.2.1/org.eclipse.platform.doc.user/_countTest/tasks-cvs-passwords", false); | |
215 | - doTestLoad("3.2.1/org.eclipse.platform.doc.user/_countTest/colordialog", false); | |
216 | - } | |
217 | -} |
@@ -1,40 +0,0 @@ | ||
1 | -/* | |
2 | - * Copyright (c) 2005- Shinji Kashihara. | |
3 | - * All rights reserved. This program are made available under | |
4 | - * the terms of the Eclipse Public License v1.0 which accompanies | |
5 | - * this distribution, and is available at epl-v10.html. | |
6 | - */ | |
7 | -package jp.sourceforge.mergedoc.pleiades.resource; | |
8 | - | |
9 | - | |
10 | -/** | |
11 | - * 翻訳辞書クラスのヘルプ・テスト・クラスです。 | |
12 | - * <p> | |
13 | - * @author cypher256 | |
14 | - */ | |
15 | -public class TranslationDictionaryHelpTest extends TranslationDictionaryTest { | |
16 | - | |
17 | - /** assertLookupHelp */ | |
18 | - protected void assertLookupHelp(String input, String expected) { | |
19 | - | |
20 | - TranslationResult result = target.lookup(input); | |
21 | - System.out.println(input + "=" + result.getValue()); | |
22 | - assertEquals(expected, result.getValue()); | |
23 | - assertEquals(true, result.isFound()); | |
24 | - } | |
25 | - | |
26 | - //------------------------------------------------------------------------- | |
27 | - | |
28 | - /** テスト */ | |
29 | - public void testHelp() { | |
30 | - | |
31 | - // 句点分割 () | |
32 | - assertLookupHelp( | |
33 | - "When active, completion doesn't show that you can not see (e.g. you can not see private methods of a super class).", | |
34 | - "アクティブ時に、完了は不可視であるものを表示しません (例えば、スーパー・クラスの private メソッドを見ることはできません)。"); | |
35 | - | |
36 | - // ヘルプ・ロード後 | |
37 | - super.testLookup(); | |
38 | - super.testLookupIgnoreMnemonic(); | |
39 | - } | |
40 | -} |
@@ -463,7 +463,7 @@ | ||
463 | 463 | <td colspan=2><b>無効な Javadoc タグの報告</b> (<a href="../reference/api/org/eclipse/jdt/core/JavaCore.html#COMPILER_PB_INVALID_JAVADOC_TAGS">COMPILER_PB_INVALID_JAVADOC_TAGS</a>)</td> |
464 | 464 | </tr> |
465 | 465 | <tr valign="top"> |
466 | -<td rowspan=2>使用可能にすると、コンパイラーは、Javadoc 内のアンバウンドまたは予期しない参照タグをシグナルとして出します。未宣言の例外を参照する「スロー」タグは、予期しないものと見なされます。<br>この診断は、Javadoc に関連した構成体の可視性に基づいて使用可能になることに注意してください。また、設定「org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility」も参照してください。</td> | |
466 | +<td rowspan=2>使用可能にすると、コンパイラーは、Javadoc 内のアンバウンドまたは予期しない参照タグをシグナルとして出します。未宣言の例外を参照する「スロー」タグは、予期しないものと見なされます。<br>この診断は、Javadoc に関連付けられた構成体の可視性に基づいて使用可能にすることができることに気をつけてください。また、設定「org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility」も参照してください。</td> | |
467 | 467 | <td><a href="../reference/api/org/eclipse/jdt/core/JavaCore.html#ENABLED"><b><i>ENABLED</i></b></a></td> |
468 | 468 | </tr> |
469 | 469 | <tr valign="top"> |
@@ -474,7 +474,7 @@ | ||
474 | 474 | <td colspan=2><b>推奨されない参照がある無効な Javadoc タグの報告</b> (<a href="../reference/api/org/eclipse/jdt/core/JavaCore.html#COMPILER_PB_INVALID_JAVADOC_TAGS__DEPRECATED_REF">COMPILER_PB_INVALID_JAVADOC_TAGS__DEPRECATED_REF</a>)</td> |
475 | 475 | </tr> |
476 | 476 | <tr valign="top"> |
477 | -<td rowspan=2>Javadoc タグで使用されている推奨されない参照をコンパイラーが報告するかどうかを指定します。<br>この診断は、Javadoc に関連した構成体の可視性に基づいて使用可能になることに注意してください。また、設定「org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility」も参照してください。</td> | |
477 | +<td rowspan=2>Javadoc タグで使用されている推奨されない参照をコンパイラーが報告するかどうかを指定します。<br>この診断は、Javadoc に関連付けられた構成体の可視性に基づいて使用可能にすることができることに気をつけてください。また、設定「org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility」も参照してください。</td> | |
478 | 478 | <td><a href="../reference/api/org/eclipse/jdt/core/JavaCore.html#ENABLED"><b><i>ENABLED</i></b></a></td> |
479 | 479 | </tr> |
480 | 480 | <tr valign="top"> |
@@ -485,7 +485,7 @@ | ||
485 | 485 | <td colspan=2><b>不可視の参照がある無効な Javadoc タグの報告</b> (<a href="../reference/api/org/eclipse/jdt/core/JavaCore.html#COMPILER_PB_INVALID_JAVADOC_TAGS__NOT_VISIBLE_REF">COMPILER_PB_INVALID_JAVADOC_TAGS__NOT_VISIBLE_REF</a>)</td> |
486 | 486 | </tr> |
487 | 487 | <tr valign="top"> |
488 | -<td rowspan=2>Javadoc タグで使用されている不可視の参照をコンパイラーが報告するかどうかを指定します。<br>この診断は、Javadoc に関連した構成体の可視性に基づいて使用可能になることに注意してください。また、設定「org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility」も参照してください。</td> | |
488 | +<td rowspan=2>Javadoc タグで使用されている不可視の参照をコンパイラーが報告するかどうかを指定します。<br>この診断は、Javadoc に関連付けられた構成体の可視性に基づいて使用可能にすることができることに気をつけてください。また、設定「org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility」も参照してください。</td> | |
489 | 489 | <td><a href="../reference/api/org/eclipse/jdt/core/JavaCore.html#ENABLED"><b><i>ENABLED</i></b></a></td> |
490 | 490 | </tr> |
491 | 491 | <tr valign="top"> |
@@ -0,0 +1,217 @@ | ||
1 | +/* | |
2 | + * Copyright (c) 2005- Shinji Kashihara. | |
3 | + * All rights reserved. This program are made available under | |
4 | + * the terms of the Eclipse Public License v1.0 which accompanies | |
5 | + * this distribution, and is available at epl-v10.html. | |
6 | + */ | |
7 | +package jp.sourceforge.mergedoc.pleiades.resource; | |
8 | + | |
9 | +import java.io.File; | |
10 | +import java.io.FileInputStream; | |
11 | +import java.io.FileNotFoundException; | |
12 | +import java.io.FileOutputStream; | |
13 | +import java.io.IOException; | |
14 | +import java.io.InputStream; | |
15 | +import java.io.OutputStream; | |
16 | +import java.util.LinkedList; | |
17 | +import java.util.List; | |
18 | + | |
19 | +import jp.sourceforge.mergedoc.pleiades.generator.nls.HelpExtractor; | |
20 | +import jp.sourceforge.mergedoc.pleiades.generator.nls.HtmlFragmentList; | |
21 | +import jp.sourceforge.mergedoc.pleiades.resource.HelpHtmlParser.HtmlFragment; | |
22 | +import junit.framework.TestCase; | |
23 | + | |
24 | +import org.apache.commons.io.FileUtils; | |
25 | +import org.apache.commons.io.IOUtils; | |
26 | + | |
27 | +/** | |
28 | + * HTML パーサー・テスト・クラスです。 | |
29 | + * <p> | |
30 | + * @author cypher256 | |
31 | + */ | |
32 | +public class HelpHtmlParserTestX extends TestCase implements FileNames { | |
33 | + | |
34 | + /** 日本語 HTML 文字セット */ | |
35 | + private static final String JA_HTML_CHARSET = "UTF-8"; | |
36 | + | |
37 | + /** 辞書 */ | |
38 | + private static final TranslationDictionary dic = new TranslationDictionary(); | |
39 | + | |
40 | + /** ルート・ディレクトリー */ | |
41 | + private static File ROOT_DIR; | |
42 | + | |
43 | + /** 入力ストリーム・リスト */ | |
44 | + private List<InputStream> isList = new LinkedList<InputStream>(); | |
45 | + | |
46 | + /** | |
47 | + * コンストラクタ | |
48 | + * @throws IOException | |
49 | + */ | |
50 | + public HelpHtmlParserTestX() throws IOException { | |
51 | + | |
52 | + String path = HelpHtmlParserTestX.class.getName().replace(".", "/") + ".class"; | |
53 | + ClassLoader loader = Thread.currentThread().getContextClassLoader(); | |
54 | + File pathDir = new File(loader.getResource(path).getPath()).getParentFile(); | |
55 | + ROOT_DIR = new File(pathDir.getCanonicalPath().replace("bintest", "srctest")); | |
56 | + } | |
57 | + | |
58 | + /** | |
59 | + * テスト前処理 | |
60 | + */ | |
61 | + @Override | |
62 | + protected void setUp() throws Exception { | |
63 | + } | |
64 | + | |
65 | + /** | |
66 | + * テスト後処理 | |
67 | + */ | |
68 | + @Override | |
69 | + protected void tearDown() throws Exception { | |
70 | + for (InputStream is : isList) { | |
71 | + IOUtils.closeQuietly(is); | |
72 | + } | |
73 | + } | |
74 | + | |
75 | + /** | |
76 | + * ファイル取得 | |
77 | + * @param name | |
78 | + * @return | |
79 | + */ | |
80 | + private File getFile(String name) { | |
81 | + return new File(ROOT_DIR, name); | |
82 | + } | |
83 | + | |
84 | + /** | |
85 | + * 入力ストリーム取得 | |
86 | + * @param name | |
87 | + * @return 入力ストリーム | |
88 | + * @throws FileNotFoundException | |
89 | + */ | |
90 | + private InputStream getInputStream(String name) throws FileNotFoundException { | |
91 | + File file = getFile(name); | |
92 | + if (!file.exists()) { | |
93 | + fail("リソースが見つかりません。" + file.getPath()); | |
94 | + } | |
95 | + return new FileInputStream(file); | |
96 | + } | |
97 | + | |
98 | + /** | |
99 | + * 日本語 HTML 書込み | |
100 | + * @param parser | |
101 | + * @param targetDir | |
102 | + * @return | |
103 | + * @throws Exception | |
104 | + */ | |
105 | + private String writeJaActualHtml(HelpHtmlParser parser, String targetDir) throws Exception { | |
106 | + | |
107 | + String jaHtml = IOUtils.toString(parser.getInputStream(), JA_HTML_CHARSET); | |
108 | + File dir = getFile(targetDir + "/en.html").getParentFile(); | |
109 | + OutputStream os = new FileOutputStream(new File(dir, "ja_actual.html")); | |
110 | + IOUtils.write(jaHtml, os, JA_HTML_CHARSET); | |
111 | + os.close(); | |
112 | + return jaHtml; | |
113 | + } | |
114 | + | |
115 | + /** | |
116 | + * テスト実行 | |
117 | + * @param targetDir | |
118 | + * @param isLogOut ログ出力する場合は true | |
119 | + * @throws Exception | |
120 | + */ | |
121 | + private PropertySet doTestLoad(String targetDir, boolean isLogOut) | |
122 | + throws FileNotFoundException { | |
123 | + | |
124 | + // 英語リソース抽出 | |
125 | + String enPath = targetDir + "/en.html"; | |
126 | + HtmlFragmentList enList = new HtmlFragmentList(enPath); | |
127 | + for (HtmlFragment f : new HelpHtmlParser(getInputStream(enPath))) { | |
128 | + enList.add(f); | |
129 | + } | |
130 | + // 日本語リソース抽出 | |
131 | + String jaPath = targetDir + "/ja.html"; | |
132 | + HtmlFragmentList jaList = new HtmlFragmentList(jaPath); | |
133 | + for (HtmlFragment f : new HelpHtmlParser(getInputStream(jaPath))) { | |
134 | + jaList.add(f); | |
135 | + } | |
136 | + String msg = new HelpExtractor().optimizeListSize(enList, jaList); | |
137 | + if (isLogOut) { | |
138 | + System.out.println(msg); | |
139 | + } | |
140 | + | |
141 | + // プロパティー作成 | |
142 | + PropertySet actualProp = new PropertySet(); | |
143 | + for (int i = 0; i < Math.max(enList.size(), jaList.size()); i++) { | |
144 | + | |
145 | + HtmlFragment en = i < enList.size() ? enList.get(i) : null; | |
146 | + HtmlFragment ja = i < jaList.size() ? jaList.get(i) : null; | |
147 | + String enText = en == null ? "" : en.getText(); | |
148 | + String jaText = ja == null ? "" : ja.getText(); | |
149 | + | |
150 | + // 確認用のログ出力 | |
151 | + if (isLogOut) { | |
152 | + System.out.println("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"); | |
153 | + System.out.println(en); | |
154 | + System.out.println("──────────────"); | |
155 | + System.out.println(ja); | |
156 | + System.out.println("──────────────"); | |
157 | + String jaDic = dic.lookup(enText).getValue(); | |
158 | + System.out.println("id" + i + ":辞書" + (jaDic.equals(jaText) ? "○" : "●") + "| " + jaDic); | |
159 | + } | |
160 | + | |
161 | + actualProp.put(enText, jaText); | |
162 | + } | |
163 | + assertEquals(enList.size(), jaList.size()); | |
164 | + | |
165 | + return actualProp; | |
166 | + } | |
167 | + | |
168 | + /** | |
169 | + * テスト実行 | |
170 | + * @param targetDir | |
171 | + * @param isLogOut ログ出力する場合は true | |
172 | + * @throws Exception | |
173 | + */ | |
174 | + private void doTest(String targetDir, boolean isLogOut) throws Exception { | |
175 | + | |
176 | + PropertySet actualProp = doTestLoad(targetDir, isLogOut); | |
177 | + File transPropFile = getFile(targetDir + "/trans.properties"); | |
178 | + actualProp.store(transPropFile, "JUnit テスト結果プロパティー"); | |
179 | + | |
180 | + // HTML の検証 | |
181 | + HelpHtmlParser parser = new HelpHtmlParser(getInputStream(targetDir + "/en.html")); | |
182 | + for (HtmlFragment f : parser) { | |
183 | + String en = f.getText(); | |
184 | + String ja = dic.lookupHelp(en).getValue(); | |
185 | + f.setText(ja); | |
186 | + } | |
187 | + String jaHtml = writeJaActualHtml(parser, targetDir); | |
188 | + String expected = FileUtils.readFileToString(getFile(targetDir + "/ja_expected.html"), JA_HTML_CHARSET); | |
189 | + assertEquals(expected, jaHtml); | |
190 | + } | |
191 | + | |
192 | + /** | |
193 | + * テスト | |
194 | + * @throws Exception | |
195 | + */ | |
196 | + public void test311a() throws Exception { | |
197 | + | |
198 | + doTest("3.1.1a/org.eclipse.jdt.doc.isv_3.1.1/jdt_api_options", false); | |
199 | + doTest("3.1.1a/org.eclipse.platform.doc.user_3.1.1/whatsNew/platform_whatsnew", false); | |
200 | + } | |
201 | + | |
202 | + /** | |
203 | + * テスト | |
204 | + * @throws Exception | |
205 | + */ | |
206 | + public void test321() throws Exception { | |
207 | + | |
208 | + doTest("3.2.1/org.eclipse.help.base/help_home", false); | |
209 | + doTest("3.2.1/org.eclipse.platform.doc.user/gettingStarted/qs-02a", false); | |
210 | + | |
211 | + doTestLoad("3.2.1/org.eclipse.platform.doc.user/_countTest/ref-19cvs", false); | |
212 | + doTestLoad("3.2.1/org.eclipse.platform.doc.user/_countTest/ref-19cvs-password", false); | |
213 | + doTestLoad("3.2.1/org.eclipse.platform.doc.user/_countTest/cprbview", false); | |
214 | + doTestLoad("3.2.1/org.eclipse.platform.doc.user/_countTest/tasks-cvs-passwords", false); | |
215 | + doTestLoad("3.2.1/org.eclipse.platform.doc.user/_countTest/colordialog", false); | |
216 | + } | |
217 | +} |
@@ -0,0 +1,40 @@ | ||
1 | +/* | |
2 | + * Copyright (c) 2005- Shinji Kashihara. | |
3 | + * All rights reserved. This program are made available under | |
4 | + * the terms of the Eclipse Public License v1.0 which accompanies | |
5 | + * this distribution, and is available at epl-v10.html. | |
6 | + */ | |
7 | +package jp.sourceforge.mergedoc.pleiades.resource; | |
8 | + | |
9 | + | |
10 | +/** | |
11 | + * 翻訳辞書クラスのヘルプ・テスト・クラスです。 | |
12 | + * <p> | |
13 | + * @author cypher256 | |
14 | + */ | |
15 | +public class TranslationDictionaryHelpTestX extends TranslationDictionaryTest { | |
16 | + | |
17 | + /** assertLookupHelp */ | |
18 | + protected void assertLookupHelp(String input, String expected) { | |
19 | + | |
20 | + TranslationResult result = target.lookup(input); | |
21 | + System.out.println(input + "=" + result.getValue()); | |
22 | + assertEquals(expected, result.getValue()); | |
23 | + assertEquals(true, result.isFound()); | |
24 | + } | |
25 | + | |
26 | + //------------------------------------------------------------------------- | |
27 | + | |
28 | + /** テスト */ | |
29 | + public void testHelp() { | |
30 | + | |
31 | + // 句点分割 () | |
32 | + assertLookupHelp( | |
33 | + "When active, completion doesn't show that you can not see (e.g. you can not see private methods of a super class).", | |
34 | + "アクティブ時に、完了は不可視であるものを表示しません (例えば、スーパー・クラスの private メソッドを見ることはできません)。"); | |
35 | + | |
36 | + // ヘルプ・ロード後 | |
37 | + super.testLookup(); | |
38 | + super.testLookupIgnoreMnemonic(); | |
39 | + } | |
40 | +} |
@@ -6,7 +6,6 @@ | ||
6 | 6 | */ |
7 | 7 | package jp.sourceforge.mergedoc.pleiades.aspect.resource; |
8 | 8 | |
9 | -import java.io.InputStream; | |
10 | 9 | import java.util.Arrays; |
11 | 10 | import java.util.HashMap; |
12 | 11 | import java.util.Map; |
@@ -13,9 +12,7 @@ | ||
13 | 12 | |
14 | 13 | import jp.sourceforge.mergedoc.pleiades.aspect.advice.JointPoint; |
15 | 14 | import jp.sourceforge.mergedoc.pleiades.log.Logger; |
16 | -import jp.sourceforge.mergedoc.pleiades.resource.HelpHtmlParser; | |
17 | 15 | import jp.sourceforge.mergedoc.pleiades.resource.Mnemonics; |
18 | -import jp.sourceforge.mergedoc.pleiades.resource.HelpHtmlParser.HtmlFragment; | |
19 | 16 | |
20 | 17 | /** |
21 | 18 | * 翻訳ユーティリティーです。 |
@@ -255,6 +252,7 @@ | ||
255 | 252 | return dictionary.lookupIgnoreMnemonic(en, jointPoint); |
256 | 253 | } |
257 | 254 | |
255 | + // 不完全なため廃止。2009.09.10 | |
258 | 256 | /** |
259 | 257 | * 指定された英語ヘルプ入力ストリームを翻訳します。 |
260 | 258 | * <p> |
@@ -261,7 +259,6 @@ | ||
261 | 259 | * @param enIs 英語ヘルプ入力ストリーム |
262 | 260 | * @param jointPoint ジョイント・ポイント |
263 | 261 | * @return 翻訳後入力ストリーム。翻訳できない場合は引数と同じ。 |
264 | - */ | |
265 | 262 | public static InputStream translateHelp(InputStream enIs, JointPoint jointPoint) { |
266 | 263 | |
267 | 264 | // 今のところ、debug 時のみ有効 |
@@ -280,6 +277,7 @@ | ||
280 | 277 | } |
281 | 278 | return parser.getInputStream(); |
282 | 279 | } |
280 | + */ | |
283 | 281 | |
284 | 282 | /** |
285 | 283 | * 指定した値をデバッグ・ログとして出力します。 |
@@ -1,6 +1,8 @@ | ||
1 | 1 | 1.3.1.I20090910 |
2 | 2 | |
3 | -・Eclipse 3.5 の訳を一部追加 | |
3 | +・[#16664] 翻訳: org.tigris.subversion.subclipse-20090510 - 95件 (iga, ymoto) | |
4 | +・[#16830] 翻訳: org.eclipse-SDK_3.5-20090601.xlf - 71件 (iga, ymoto) | |
5 | +・[#18570] 翻訳: org.eclipse.datatools-jee-galileo - 21件 (iga, ymoto) | |
4 | 6 | |
5 | 7 | 1.3.1.I20090811 |
6 | 8 |
@@ -19,8 +19,8 @@ | ||
19 | 19 | <property name="version" value="1.3.1"/> |
20 | 20 | |
21 | 21 | <!-- コピー先ディレクトリー --> |
22 | - <property name="dist.dir" location="/user/dist/3.4"/> | |
23 | - <property name="this.eclipse.dir" location="../../Tools/Eclipse3.4.2/dropins/MergeDoc/eclipse"/> | |
22 | + <property name="dist.dir" location="/user/dist/3.5"/> | |
23 | + <property name="this.eclipse.dir" location="../../Tools/Eclipse3.5.1/dropins/MergeDoc/eclipse"/> | |
24 | 24 | |
25 | 25 | <!-- プロダクト定数定義 --> |
26 | 26 | <property name="project.name" value="pleiades"/> |
@@ -69,6 +69,7 @@ | ||
69 | 69 | </target> |
70 | 70 | |
71 | 71 | <!-- ヘルプ翻訳プロパティーの生成、翻訳プロパティーの生成 --> |
72 | + <!-- 再生成はもうしない。FIX する。 | |
72 | 73 | <target name="generate-clean-help" description=""> |
73 | 74 | <java |
74 | 75 | classname="jp.sourceforge.mergedoc.pleiades.generator.nls.HelpExtractor" |
@@ -79,6 +80,7 @@ | ||
79 | 80 | </java> |
80 | 81 | <antcall target="generate-clean"/> |
81 | 82 | </target> |
83 | + --> | |
82 | 84 | |
83 | 85 | <!-- ビルド (SVN 管理) --> |
84 | 86 | <target name="build" depends="" description=""> |
@@ -331,9 +333,9 @@ | ||
331 | 333 | <param name="test.eclipse.exe" value="eclipse.exe"/> |
332 | 334 | </antcall> |
333 | 335 | </target> |
334 | - <target name="test.3.5.0trans" description="" depends="build.this.eclipse"> | |
336 | + <target name="test.3.5.1" description="" depends="build.this.eclipse"> | |
335 | 337 | <antcall target="test.eclipse.dropins"> |
336 | - <param name="test.eclipse.dir" value="../../Tools/Eclipse3.5.0"/> | |
338 | + <param name="test.eclipse.dir" value="../../Tools/Eclipse3.5.1Test"/> | |
337 | 339 | <param name="test.eclipse.exe" value="eclipse.exe"/> |
338 | 340 | </antcall> |
339 | 341 | </target> |