Bug 204066 - i18n function descriptions
Summary: i18n function descriptions
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: PHP Core CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2007-09-19 23:01 EDT by Toshihiro Izumi CLA
Modified: 2020-05-14 11:17 EDT (History)
3 users (show)

See Also:
ganoro: iplog+


Attachments
sample patch (2.32 KB, patch)
2009-06-07 23:15 EDT, Toshihiro Izumi CLA
no flags Details | Diff
sample fragment project (80.82 KB, application/octet-stream)
2009-06-07 23:17 EDT, Toshihiro Izumi CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toshihiro Izumi CLA 2007-09-19 23:01:26 EDT
It seems not to be able to internationalize function descriptions (in function hover, code assist information).
Maybe org.eclipse.php.internal.core.phpModel.parser.PHPLanguageModel.loadFile() should be implemented with substituteArgs=true and InputStreamReader(InputStream, Charset) and appropriate path (e.g. "$nl$/Resources/..." ?).
This request is for code implementation but internationalized resources such as language pack will be highly appreciated of course.
Comment 1 Michael Spector CLA 2009-06-07 16:46:46 EDT
(In reply to comment #0)
> It seems not to be able to internationalize function descriptions (in function
> hover, code assist information).
> Maybe org.eclipse.php.internal.core.phpModel.parser.PHPLanguageModel.loadFile()
> should be implemented with substituteArgs=true and
> InputStreamReader(InputStream, Charset) and appropriate path (e.g.
> "$nl$/Resources/..." ?).
> This request is for code implementation but internationalized resources such as
> language pack will be highly appreciated of course.
> 

Do you have a patch?
Comment 2 Toshihiro Izumi CLA 2009-06-07 23:15:52 EDT
Created attachment 138539 [details]
sample patch

Thanks for your attention :-)
Here is a sample patch.
Though I'm not sure this is appropriate way... because language data files are not merely string resources. (I guess it should be separated in future.)
Comment 3 Toshihiro Izumi CLA 2009-06-07 23:17:26 EDT
Created attachment 138540 [details]
sample fragment project

This is a sample NLS fragment project.
Usage:
1. Import project.
2. Run new runtime.
3. Make sure pdt works normally and exit runtime.
4. Edit launch configuration - Arguments - Program arguments
   "-nl ${target.nl}" -> "-nl ja_JP"
5. Run
6. Close php prpject and open it again (for recreate index).
7. Make sure Japanese appears on code assist description/tooltip/etc.
Comment 4 Michael Spector CLA 2009-06-08 04:05:11 EDT
Thanks, I've submitted your patch to CVS HEAD!
Comment 5 Toshihiro Izumi CLA 2009-06-08 18:54:09 EDT
Thanks a lot!

One more request...
I can create language files in Japanese for php5 by generate.php (thanks!), but I cannot create them for php4/php5.3. How can I create them?
Could you please provide generate.php for php4/php5.3?
Comment 6 Michael Spector CLA 2009-06-09 03:53:28 EDT
(In reply to comment #5)
> Thanks a lot!
> 
> One more request...
> I can create language files in Japanese for php5 by generate.php (thanks!), but
> I cannot create them for php4/php5.3. How can I create them?
> Could you please provide generate.php for php4/php5.3?
> 

Unfortunately, reflection in PHP is available starting from PHP 5 only, so it is not possible to generate language model for PHP 4. As for PHP 5.3 - it should work, what exactly doesn't work for you?
Comment 7 Toshihiro Izumi CLA 2009-06-10 04:49:38 EDT
oops, I'm sorry I misunderstood generate.php is for php5 only. I didn't try it against php5.3. I'll try it.
Thanks again :-)
Comment 8 Vadim Punski CLA 2009-12-30 09:24:52 EST
closing