Bug 145833 - Remove ITEMVALMEASURETEXTTYPES part in SdrMeasureTextHPosItem
Summary: Remove ITEMVALMEASURETEXTTYPES part in SdrMeasureTextHPosItem
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
7.3.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: target:7.3.0
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-22 16:03 UTC by sophie
Modified: 2021-11-24 20:30 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sophie 2021-11-22 16:03:13 UTC
Comment from Tuomas: I guess the meaning is "outside, on the left" and not "something that's been left outside", but this could be clarified...

location of the string: https://git.libreoffice.org/core/+/master/include/svx/strings.hrc#304
Comment 2 Julien Nabet 2021-11-22 21:00:19 UTC
Indeed.
304 #define STR_ItemValMEASURE_TEXTLEFTOUTSIDE                  NC_("STR_ItemValMEASURE_TEXTLEFTOUTSIDE", "left outside")

306 #define STR_ItemValMEASURE_TEXTRIGHTOUTSID                  NC_("STR_ItemValMEASURE_TEXTRIGHTOUTSID", "right outside")

Heiko/Xisco: any idea for short string with a clear meaning in these 2 cases?
Comment 3 Heiko Tietze 2021-11-23 14:35:21 UTC
Digging into the code, it seems this values are used for internal purpose on the dimension lines.

STR_ItemValMEASURE_TEXTLEFTOUTSIDE in
SdrMeasureTextHPosItem::GetValueTextByPos(sal_uInt16 nPos)

SvxMeasurePage::FillItemSet( SfxItemSet* rAttrs)
...
   rAttrs->Put( SdrMeasureTextHPosItem( eHPos ) );


My take: NAB/WF
Comment 4 Julien Nabet 2021-11-23 14:44:54 UTC
(In reply to Heiko Tietze from comment #3)
> Digging into the code, it seems this values are used for internal purpose on
> the dimension lines.
> 
> STR_ItemValMEASURE_TEXTLEFTOUTSIDE in
> SdrMeasureTextHPosItem::GetValueTextByPos(sal_uInt16 nPos)
> 
> SvxMeasurePage::FillItemSet( SfxItemSet* rAttrs)
> ...
>    rAttrs->Put( SdrMeasureTextHPosItem( eHPos ) );
> 
> 
> My take: NAB/WF

Just to be sure not having misunderstood, it means these strings shouldn't be translatable?
Comment 5 Heiko Tietze 2021-11-23 15:01:21 UTC
(In reply to Julien Nabet from comment #4)
> Just to be sure not having misunderstood, it means these strings shouldn't
> be translatable?

Seems so
Comment 6 sophie 2021-11-23 15:40:30 UTC
(In reply to Heiko Tietze from comment #5)
> (In reply to Julien Nabet from comment #4)
> > Just to be sure not having misunderstood, it means these strings shouldn't
> > be translatable?
> 
> Seems so

so then, it's still a bug that it's exposed to l10n :-)
Comment 7 Julien Nabet 2021-11-23 21:39:21 UTC
Heiko: searching about GetValueTextByPos, I got https://opengrok.libreoffice.org/search?project=core&full=&defs=GetValueTextByPos&refs=&path=&hist=&type=&xrd=&nn=1&si=full&si=full and I see each time this type of pattern:
939  OUString SdrCaptionTypeItem::GetValueTextByPos(sal_uInt16 nPos)
940  {
941      static TranslateId ITEMVALCAPTIONTYPES[] =
942      {
943          STR_ItemValCAPTIONTYPE1,
944          STR_ItemValCAPTIONTYPE2,
945          STR_ItemValCAPTIONTYPE3,
946          STR_ItemValCAPTIONTYPE4
947      };
948      assert(nPos < SAL_N_ELEMENTS(ITEMVALCAPTIONTYPES) && "wrong pos!");
949      return SvxResId(ITEMVALCAPTIONTYPES[nPos]);
950  }

do you mean all of these don't need translations?

Regina/Miklos: any thoughts here?

I mean I wouldn't like we remove translated strings by error.
Comment 8 Miklos Vajna 2021-11-24 08:47:42 UTC
Sorry, no idea about these legend objects in charts.
Comment 9 Julien Nabet 2021-11-24 08:59:24 UTC
(In reply to Miklos Vajna from comment #8)
> Sorry, no idea about these legend objects in charts.

Just in case Regina doesn't know too, any idea whom to ping?
Should I ask on dev mailing list instead?
Comment 10 Regina Henschel 2021-11-24 10:26:44 UTC
I don't know a place in the UI, where the string is shown. I suggest to remove it from translation. In case I oversee an occurrence and there will be a user complain about missing translation, we can change the string.

Even with keeping it as "left outside", the meaning is clear in context of measure lines.
Comment 11 Julien Nabet 2021-11-24 17:33:01 UTC
I submitted https://gerrit.libreoffice.org/c/core/+/125785 on gerrit.

I removed translation mechanism only for SdrMeasureTextHPosItem but it seems a lot of other locations may be candidates to this cleaning (see comment 7).
Comment 12 Commit Notification 2021-11-24 20:28:18 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/be31a1de5c53e997ea6af5af51baa28e1e183733

tdf#145833: Remove ITEMVALMEASURETEXTTYPES part in SdrMeasureTextHPosItem (svx)

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Julien Nabet 2021-11-24 20:30:55 UTC
Let's change the title of the bugtracker to match it with the patch.