Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 164358 - I18N: "Go to Source" not working when LBL_At is localized and "at" position is changed
I18N: "Go to Source" not working when LBL_At is localized and "at" position i...
Status: VERIFIED FIXED
Product: php
Classification: Unclassified
Component: PHPUnit
6.x
All All
: P2 (vote)
: 6.x
Assigned To: Tomas Mysik
issues@php
JA_COMMUNITY
: I18N
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-04 05:36 UTC by Masaki Katakai
Modified: 2009-05-14 08:51 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Masaki Katakai 2009-05-04 05:36:02 UTC
NetBeans IDE 6.7 Beta (Build 200904242137)
Java: 1.5.0_16; Java HotSpot(TM) Client VM 1.5.0_16-133
Mac OS X 10.5.6; UTF8; ja_JP (nb)

These codes may not work properly when LBL_At is localized.
Actually on 6.7 Beta Japanese, "Go to Source" (actionPerformed()
in JumpToCallStackAction.java) is not working.

  php.project/src/org/netbeans/modules/php/project/util/PhpUnit.java

    static final String AT_I18N = NbBundle.getMessage(UnitTestRunner.class, "LBL_At").replace("{0}", ""); // NOI18N
    public static final Pattern LINE_PATTERN = Pattern.compile("(?:" + AT_I18N + ")?(?:.+\\(\\) )?(.+):(\\d+)"); // NOI18N

  php.project/src/org/netbeans/modules/php/project/ui/testrunner/Bundle.properties
    LBL_At=at {0}

  php.project/src/org/netbeans/modules/php/project/ui/testrunner/JumpToCallStackAction.java
    public void actionPerformed(ActionEvent e) {
        Matcher matcher = PhpUnit.LINE_PATTERN.matcher(callstackFrameInfo);
        if (matcher.matches()) {
            String path = matcher.group(1);
            String line = matcher.group(2);
            PhpProjectUtils.openFile(path, Integer.valueOf(line));
        }
    }

It is not good idea that assuming the order of "at" and "{0}"
is the same with English.

at {0}

will be localized into the following in Japanese usually.

{0} <translation of at>

I'd like to suggest the easy solution - is it possible to remove "at"
and just put "filename:line" into the line? Or it is possible to get
just "filename:line" pattern from the strings and ignore the position
of "at"?
Comment 1 Tomas Mysik 2009-05-04 10:04:31 UTC
OK, I will probably remove it. Thanks for reporting.
Comment 2 Tomas Mysik 2009-05-05 15:39:46 UTC
Should be fixed, please verify. Thanks.
http://hg.netbeans.org/web-main/rev/e85b64e75487
Comment 3 Quality Engineering 2009-05-07 08:07:48 UTC
Integrated into 'main-golden', will be available in build *200905070201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/e85b64e75487
User: Tomas Mysik <tmysik@netbeans.org>
Log: #164358: I18N: "Go to Source" not working when LBL_At is localized and "at" position is changed
Comment 4 Masaki Katakai 2009-05-14 05:35:43 UTC
I've verified it works fine on localized environment.
Thank you very much Tomas, it's great!
Comment 5 Tomas Mysik 2009-05-14 08:51:29 UTC
You are welcome. Thanks for reporting.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo