Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 301669 - Error occurs in TPTP plug-in with Babel Japanese language pack
Summary: Error occurs in TPTP plug-in with Babel Japanese language pack
Status: RESOLVED FIXED
Alias: None
Product: Babel
Classification: Technology
Component: EnglishStrings (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Kit Lo CLA
QA Contact:
URL:
Whiteboard:
Keywords: nl
Depends on:
Blocks:
 
Reported: 2010-02-03 03:47 EST by Motoki MORI CLA
Modified: 2010-02-15 11:47 EST (History)
2 users (show)

See Also:


Attachments
Error message on the configuration window of TPTP (66.14 KB, image/jpeg)
2010-02-03 03:50 EST, Motoki MORI CLA
no flags Details
a view of a log file (67.88 KB, image/jpeg)
2010-02-03 03:52 EST, Motoki MORI CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Motoki MORI CLA 2010-02-03 03:47:38 EST
Build Identifier: Eclipse 3.4.2,  Babel 3.4.0.v20090620043401, TPTP Platform Project 4.5.2.v200901090956  

According to the log file, 
"IAC could not be started due to invalid configuration files"
"Execution framework config file is invalid."

When TPTP gets launched, it creates a file of "serviceconfig.xml", and gets the tag name by using "getString" method. Here the return value from ResourceBundle becomes in "Japanese." This cause a wrong tag name. 



org.eclipse.tptp.platform.agentcontroller.config.ConfigUtility
----------------- 14-55 --------------------------------- import java.io.BufferedReader; import java.io.File; import java.io.IOException; import java.io.InputStreamReader; import java.util.MissingResourceException;
import java.util.ResourceBundle;
import java.util.StringTokenizer;

import org.w3c.dom.Attr;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

import com.ibm.icu.util.ULocale;

public class ConfigUtility implements IConfigUtility{
	private static String resourceLocation = "org.eclipse.tptp.platform.agentcontroller.config.SetConfig";
	private static String lineSeparator = System.getProperty("line.separator");
	protected static ResourceBundle resource = null;

	public static String getString(String property) {
		String value;
		value = getString(resourceLocation, property);
		return value;
	}

	public static String getString(String res, String property) {
		try {
			resource = ResourceBundle.getBundle(res);
		}
		catch (MissingResourceException e) {
			Logger.err("Cannot find property: " + property + " in resource: " +  res + e.getMessage());
		}

		if(resource != null) {
			return resource.getString(property);
		}
		else {
			Logger.err("Cannot find resource bundle: " + res);
			return null;
		}
	}


Reproducible: Always

Steps to Reproduce:
1.Add TPTP plug-in 
2.Add Japanese language pack
3.launch TPTP configuration window
4.Error message "An error occured when connecting to the host."
Comment 1 Motoki MORI CLA 2010-02-03 03:50:52 EST
Created attachment 158007 [details]
Error message on the  configuration window of TPTP
Comment 2 Motoki MORI CLA 2010-02-03 03:52:35 EST
Created attachment 158008 [details]
a view of a log file
Comment 3 Motoki MORI CLA 2010-02-03 04:00:30 EST
As far as we checked, the .properties file includes only English tags...
Comment 4 Kit Lo CLA 2010-02-03 19:22:05 EST
Many strings in this file are used to create the TPTP Agent Controller configuration file (serviceconfig.xml), and should not be translated.

http://babel.eclipse.org/babel/translate.php?project=tptp.platform&version=4.5.2&file=platform/org.eclipse.tptp.platform.agentcontroller/src-config/org/eclipse/tptp/platform/agentcontroller/config/SetConfig.properties

I marked the strings as "non-translatable" and rebuilt the language packs. I tested the new language pack in my development environment and the problem is fixed.

Mori-san, please try this: 

http://build.eclipse.org/technology/babel/babel_language_packs/N20100203-1600/BabelLanguagePack-tptp.platform-ja_3.4.0.v20100203043847.zip
Comment 5 Motoki MORI CLA 2010-02-04 22:20:59 EST
We checked the new version. It seemed to be OK. Thank you for your quick reply.
Comment 6 Kit Lo CLA 2010-02-15 11:47:19 EST
fixed