Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Garbled text of translation #11130

Closed
brownsugar opened this issue Jan 2, 2017 · 6 comments
Closed

Garbled text of translation #11130

brownsugar opened this issue Jan 2, 2017 · 6 comments
Assignees
Labels
c: Design / UI For issues that impact Matomo's user interface or the design overall. c: i18n For issues around internationalisation and localisation.
Milestone

Comments

@brownsugar
Copy link

There's a garbled text at segment editor when using language zh-TW and even zh-CN.

zh-TW (Should be 指標)
qq 20170103001523

zh-CN (Should be 指标)
qq 20170103001701

But I've checked the translated strings, there was nothing wrong with them, so I think it's a bug.

@sgiehl
Copy link
Member

sgiehl commented Jan 2, 2017

Without having a closer look I would assume that is caused by a strtolower or similar...

@sgiehl sgiehl added c: Design / UI For issues that impact Matomo's user interface or the design overall. c: i18n For issues around internationalisation and localisation. labels Jan 2, 2017
@sgiehl
Copy link
Member

sgiehl commented Jan 5, 2017

Related to #10921

@vibbow
Copy link
Contributor

vibbow commented Jan 22, 2017

I'm not sure if #10921 is the fix for this issue, since ucfirst should only break the first char of the string, and all chinese string, not some of them and middle of the string.

@mattab
Copy link
Member

mattab commented Feb 20, 2017

It occurs at this line https://github.com/piwik/piwik/blob/3.0.1/plugins/SegmentEditor/SegmentSelectorControl.php#L58-58 but I can't figure out what's the problem here... technically it's supposed to work

@mattab mattab added this to the Backlog (Help wanted) milestone Feb 20, 2017
@brownsugar
Copy link
Author

brownsugar commented Feb 20, 2017

Chinese words does not support '$metricsLabel[0]' like this split them to single characters.
This method should works: ef0f9e2

if (substr($metricsLabel, 0, 1) === mb_substr($metricsLabel, 0, 1)) {
	$metricsLabel[0] = Common::mb_strtolower($metricsLabel[0]);
}

@mattab
Copy link
Member

mattab commented Feb 20, 2017

Thanks for that, i'll open a PR now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Design / UI For issues that impact Matomo's user interface or the design overall. c: i18n For issues around internationalisation and localisation.
Projects
None yet
Development

No branches or pull requests

4 participants