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

Giteabot makes unnecessary escape for Korean translation #31606

Open
cloudchamb3r opened this issue Jul 10, 2024 · 12 comments
Open

Giteabot makes unnecessary escape for Korean translation #31606

cloudchamb3r opened this issue Jul 10, 2024 · 12 comments
Labels
topic/ui Change the appearance of the Gitea UI type/bug

Comments

@cloudchamb3r
Copy link
Contributor

Description

Please refer to de265f3

Gitea CI Bot Does Unnecessary Escapes for Korean Translation

Screenshots

Screenshot 2024-07-10 at 1 53 54 PM

Gitea Version

1.20~

Can you reproduce the bug on the Gitea demo site?

Yes

Operating System

OSX

Browser Version

chrome 126.0.6478.127

@cloudchamb3r cloudchamb3r added topic/ui Change the appearance of the Gitea UI type/bug labels Jul 10, 2024
@lunny
Copy link
Member

lunny commented Jul 10, 2024

It's the translation problem, please help to correct it in https://translate.Gitea.com

@lunny lunny removed the type/bug label Jul 10, 2024
@yp05327
Copy link
Contributor

yp05327 commented Jul 30, 2024

image
https://crowdin.com/editor/gitea/68/enus-ko?view=comfortable&filter=basic&value=0#q=issues.opened_by

image

@lunny
It is a bit strange. It seems that it is correct in Crowdin.

@yp05327
Copy link
Contributor

yp05327 commented Aug 27, 2024

There are also some other strange changes. All come from de265f3

@wxiaoguang
Copy link
Contributor

There are also some other strange changes. All come from de265f3

See my comments for more information

image

image

@yp05327
Copy link
Contributor

yp05327 commented Aug 27, 2024

I see where these double quotes come from and how it works.
So after the original locale files pulled from Crowdin, we will finally do some modified by the script before push.
(according to the workflow file)

Then I executed the script in my local, then I got this:
image
So if I understand correctly, if everything is correct, this should not happen, right?

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Aug 27, 2024

So if I understand correctly, if everything is correct, this should not happen, right?

"If everything is correct, this should not happen, right?": yes, the quotes should have been "cleaned up".

(I didn't look into it so I have no idea, just share some backgrounds)

@yp05327
Copy link
Contributor

yp05327 commented Aug 27, 2024

I think I know what happened.
I notice the comment in L3:

this script runs in alpine image which only has sh shell

Then I find the original PR is #23254.
According to it, we were use Drone before, so this script is designed for Apline before.
Then I checked the OS where I executed the script, it is dev container which is Debain.
And we are using Github Actions, it uses Ubuntu.
Then I run the script in WSL which is Ubuntu, NOTHING happened.

So this script should be changed, or it should not run in Ubuntu, which will cause this issue.

@yp05327
Copy link
Contributor

yp05327 commented Aug 27, 2024

The version of sed:

In WSL:

sed (GNU sed) 4.8
Packaged by Debian
Copyright (C) 2020 Free Software Foundation, Inc.

In Dev Container:
bullseye

sed (GNU sed) 4.7
Packaged by Debian
Copyright (C) 2018 Free Software Foundation, Inc.

bookworm

sed (GNU sed) 4.9
Packaged by Debian
Copyright (C) 2022 Free Software Foundation, Inc.

@wxiaoguang
Copy link
Contributor

And we are using Github Actions, it uses Ubuntu.
Then I run the script in WSL which is Ubuntu, NOTHING happened.

Ubuntu's "sh" defaults to "dash", which has many differences

@lunny
Copy link
Member

lunny commented Aug 28, 2024

Maybe we should rewrite these logic with Go code to avoid inconsistent between shell script commands.

@denyskon
Copy link
Member

The only reason we need this script is the ini format we're using for translations. As I think that we want to switch to another format anyway (#27700), it wouldn't make sense to build a new tool for it.

@denyskon denyskon reopened this Aug 28, 2024
@lunny
Copy link
Member

lunny commented Aug 29, 2024

The only reason we need this script is the ini format we're using for translations. As I think that we want to switch to another format anyway (#27700), it wouldn't make sense to build a new tool for it.

Ah, yes. But we need to fix the bug before a new format comes out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/ui Change the appearance of the Gitea UI type/bug
Projects
None yet
Development

No branches or pull requests

5 participants