Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-30652

Cannot translate date period for Instant Searcher's bar.

      Hi,

      This is derivation for JRA-30323, JRA-30513 and JRA-30651.
      I'm aiming full localization for new issue navigator for Japanese customers.

      Best regards,
      Kan Ogawa

          Form Name

            [JRASERVER-30652] Cannot translate date period for Instant Searcher's bar.

            I believe that I have found the source of the problem. The code which delegates off to the DateUtils.getDurationPretty(periodOffset, resourceBundle) method incorrectly passes the default resource bundle (which is the basic JIRA resource bundle), whereas it should actually be passing the regular resource bundle. I believe replacing the call in the prettyPrint() method from

            return DateUtils.getDurationPretty(periodOffSet, i18n.getDefaultResourceBundle());

            to

            return DateUtils.getDurationPretty(periodOffSet, i18n.getResourceBundle());

            will allow the Japanese translations to have effect on dates.

            KBar (Inactive) added a comment - I believe that I have found the source of the problem. The code which delegates off to the DateUtils.getDurationPretty(periodOffset, resourceBundle) method incorrectly passes the default resource bundle (which is the basic JIRA resource bundle), whereas it should actually be passing the regular resource bundle. I believe replacing the call in the prettyPrint() method from return DateUtils.getDurationPretty(periodOffSet, i18n.getDefaultResourceBundle()); to return DateUtils.getDurationPretty(periodOffSet, i18n.getResourceBundle()); will allow the Japanese translations to have effect on dates.

            Kan Ogawa added a comment -

            Hi Eric,

            We don't plan on converting our display of time data to just be the raw number of days

            I have understood about the above comment. There is nothing for it.

            However, it seems that any Japanese translations of core.dateutils.* properties aren't shown in the search bar.
            All of them in TAC were already translated as 'Accepted Translation'.

            Sample Case:

            The specified condition Within the last '40' 'days'
            Original string (English) Within the last 5 weeks, 5 days
            My expected translation 最近 5 週, 5 日 以内
            The translation shown in Issue Navigator 最近 5 weeks, 5 days 以内

            Best regards,
            Kan Ogawa

            Kan Ogawa added a comment - Hi Eric, We don't plan on converting our display of time data to just be the raw number of days I have understood about the above comment. There is nothing for it. However, it seems that any Japanese translations of core.dateutils.* properties aren't shown in the search bar. All of them in TAC were already translated as 'Accepted Translation'. Sample Case: The specified condition Within the last '40' 'days' Original string (English) Within the last 5 weeks, 5 days My expected translation 最近 5 週, 5 日 以内 The translation shown in Issue Navigator 最近 5 weeks, 5 days 以内 Best regards, Kan Ogawa

            ogawa@ricksoft.jp, I figure the previous update got lost in email Have you had any luck with the core.dateutils.* properties? Is there a different change we could make that would help?
            Regards,
            Eric

            Eric Dalgliesh added a comment - ogawa@ricksoft.jp , I figure the previous update got lost in email Have you had any luck with the core.dateutils.* properties? Is there a different change we could make that would help? Regards, Eric

            Hi ogawa@ricksoft.jp,

            We don't plan on converting our display of time data to just be the raw number of days, but we do want to have the date code be translatable for Japanese. Have you had any luck with the core.dateutils.* properties? Is there a different change we could make that would help?

            Regards,
            Eric

            Eric Dalgliesh added a comment - Hi ogawa@ricksoft.jp , We don't plan on converting our display of time data to just be the raw number of days, but we do want to have the date code be translatable for Japanese. Have you had any luck with the core.dateutils.* properties? Is there a different change we could make that would help? Regards, Eric

            Hi ogawa@ricksoft.jp,

            I was just wondering what difficulties you were finding with translating those parts to Japanese. The current code is using i18n to create the minutes/hours/etc and so could be overridden, e.g. if i18n keys are core.dateutils.years, core.dateutils.month, etc are changed.

            Thanks,
            Jaiden.

            jashmore@atlassian.com (Inactive) added a comment - Hi ogawa@ricksoft.jp , I was just wondering what difficulties you were finding with translating those parts to Japanese. The current code is using i18n to create the minutes/hours/etc and so could be overridden, e.g. if i18n keys are core.dateutils.years, core.dateutils.month, etc are changed. Thanks, Jaiden.

            Kan Ogawa added a comment -

            Eric,

            This issue is the problem about a period numeric value format.
            The period format by the value provided from the search popup dialog will be dynamically transformed. So it is difficult to translate it.

            For examples:

            Value Displayed Period Text
            30 minutes 30 minutes
            100 minutes 1 hour, 40 minutes

            Best regards,
            Kan Ogawa

            Kan Ogawa added a comment - Eric, This issue is the problem about a period numeric value format. The period format by the value provided from the search popup dialog will be dynamically transformed. So it is difficult to translate it. For examples: Value Displayed Period Text 30 minutes 30 minutes 100 minutes 1 hour, 40 minutes Best regards, Kan Ogawa

            Hi ogawa@ricksoft.jp, is this sorted out in JIRA 6.0?

            Eric Dalgliesh added a comment - Hi ogawa@ricksoft.jp , is this sorted out in JIRA 6.0?

            Kan Ogawa added a comment -

            Hi Eric,

            I have attached a sample screenshot.
            Concretely it is numeric value of date period in searcher bar.
            Also it is related to JRA-30651 issue.

            Best regards,
            Kan Ogawa

            Kan Ogawa added a comment - Hi Eric, I have attached a sample screenshot. Concretely it is numeric value of date period in searcher bar. Also it is related to JRA-30651 issue. Best regards, Kan Ogawa

            Kan Ogawa added a comment -

            Hi Eric,

            They are the following fields:

            • Due Date
            • Created Date
            • Resolved Date
            • Generic Date and Date/Time type fields (including custom field)

            Best regards,
            Kan Ogawa

            Kan Ogawa added a comment - Hi Eric, They are the following fields: Due Date Created Date Resolved Date Generic Date and Date/Time type fields (including custom field) Best regards, Kan Ogawa

            Hi Kan,

            What are the specific fields you saw that cannot be translated properly?

            Regards,
            Eric

            Eric Dalgliesh added a comment - Hi Kan, What are the specific fields you saw that cannot be translated properly? Regards, Eric

              edalgliesh Eric Dalgliesh
              f9ced3a62372 Kan Ogawa
              Affected customers:
              0 This affects my team
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: