Skip to content

Conversation

lafriks
Copy link
Member

@lafriks lafriks commented Nov 12, 2017

Fixes #2887

@lafriks lafriks added this to the 1.3.0 milestone Nov 12, 2017
@lafriks
Copy link
Member Author

lafriks commented Nov 12, 2017

Currently crowdin has folowing for these keys for translation:
attels

And completly wrong html generated for localized ini files:

issues.add_label_at=` pievienoja <div class="ui label" style="color: %s" ; background-color: %s">%s</div> label %s` 
@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Nov 12, 2017
@codecov-io
Copy link

codecov-io commented Nov 12, 2017

Codecov Report

Merging #2900 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@ Coverage Diff @@ ## master #2900 +/- ## ======================================= Coverage 27.05% 27.05% ======================================= Files 89 89 Lines 17650 17650 ======================================= Hits 4775 4775 Misses 12189 12189 Partials 686 686

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4725f91...5c06312. Read the comment docs.

@ethantkoenig
Copy link
Member

Would it make more sense to just update the i18n.Tr helper to always do unescaping?

@lafriks
Copy link
Member Author

lafriks commented Nov 12, 2017

@ethantkoenig it's not under our control

return setting.DisableGitHooks
},
"TrN": TrN,
"UnescapeBS": func(str string) string {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"BS"? I agree, but maybe we can name it better? 😂

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BackSlash :) any suggestions for better name? :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UnescapeLocale? It also took me a few minutes to figure out what BS stood for

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it actually stood for bullshit 😂 I agree with @ethantkoenig that it should be UnescapeLocale 🙂

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can stand for that also :) It can be also temporary fix if unknwon fixes that in go-ini library to support such escape as it is per ini file format. That is why I did not want it to be so intrusive

@lunny
Copy link
Member

lunny commented Nov 13, 2017

LGTM

@tboerger tboerger added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Nov 13, 2017
@bkcsoft
Copy link
Member

bkcsoft commented Nov 13, 2017

One alternative is to wrap the i18n.Tr command and start using that instead.

@lafriks
Copy link
Member Author

lafriks commented Nov 13, 2017

@ethantkoenig @bkcsoft fixed to better name

As for replacing i18n.Tr function I would not do that currently as there is still chance that go-ini at some point could be fixed and there would be no need for that

@ethantkoenig
Copy link
Member

@lafriks If this is just a temporary hack until go-ini is fixed, could we add a TODO to eventually remove this?

@lafriks
Copy link
Member Author

lafriks commented Nov 13, 2017

@ethantkoenig
Copy link
Member

LGTM

@tboerger tboerger added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Nov 13, 2017
@lafriks lafriks merged commit 134958f into go-gitea:master Nov 13, 2017
@lafriks lafriks deleted the fix/locale_en_us branch November 13, 2017 07:56
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/translation

6 participants