Giteabot makes unnecessary escape for Korean translation #13268

Open
opened 2025-11-02 10:36:44 -06:00 by GiteaMirror · 12 comments
Owner

Originally created by @cloudchamb3r on GitHub (Jul 10, 2024).

Description

Please refer to de265f3771

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

Originally created by @cloudchamb3r on GitHub (Jul 10, 2024). ### Description Please refer to https://github.com/go-gitea/gitea/commit/de265f377113766124e9846e120e2864bf01c60c Gitea CI Bot Does Unnecessary Escapes for Korean Translation ### Screenshots ![Screenshot 2024-07-10 at 1 53 54 PM](https://github.com/go-gitea/gitea/assets/98369677/f1639876-d0f1-431b-9985-524b0feba335) ### 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
GiteaMirror added the topic/uitype/bug labels 2025-11-02 10:36:44 -06:00
Author
Owner

@lunny commented on GitHub (Jul 10, 2024):

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

@lunny commented on GitHub (Jul 10, 2024): It's the translation problem, please help to correct it in https://translate.Gitea.com
Author
Owner

@yp05327 commented on GitHub (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 commented on GitHub (Jul 30, 2024): ![image](https://github.com/user-attachments/assets/c8de76e5-fb2a-43a1-8784-d984f6f6d543) https://crowdin.com/editor/gitea/68/enus-ko?view=comfortable&filter=basic&value=0#q=issues.opened_by ![image](https://github.com/user-attachments/assets/d49b7f31-c43c-4997-b9cc-a921fdedda39) @lunny It is a bit strange. It seems that it is correct in Crowdin.
Author
Owner

@yp05327 commented on GitHub (Aug 27, 2024):

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

@yp05327 commented on GitHub (Aug 27, 2024): There are also some other strange changes. All come from https://github.com/go-gitea/gitea/commit/de265f377113766124e9846e120e2864bf01c60c
Author
Owner

@wxiaoguang commented on GitHub (Aug 27, 2024):

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

See my comments for more information

image

image

@wxiaoguang commented on GitHub (Aug 27, 2024): > There are also some other strange changes. All come from [de265f3](https://github.com/go-gitea/gitea/commit/de265f377113766124e9846e120e2864bf01c60c) See my comments for more information ![image](https://github.com/user-attachments/assets/e0aade6e-94f4-4c33-83ee-140e1ae85dab) ![image](https://github.com/user-attachments/assets/133c356f-fdab-4ec6-8655-6f6b5ffada28)
Author
Owner

@yp05327 commented on GitHub (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?

@yp05327 commented on GitHub (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](https://github.com/user-attachments/assets/f481a028-0ee9-4f5b-b9ea-89907576cae0) So if I understand correctly, if everything is correct, this should not happen, right?
Author
Owner

@wxiaoguang commented on GitHub (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)

@wxiaoguang commented on GitHub (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)
Author
Owner

@yp05327 commented on GitHub (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 commented on GitHub (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.
Author
Owner

@yp05327 commented on GitHub (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.

@yp05327 commented on GitHub (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.
Author
Owner

@wxiaoguang commented on GitHub (Aug 27, 2024):

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

@wxiaoguang commented on GitHub (Aug 27, 2024): > 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
Author
Owner

@lunny commented on GitHub (Aug 28, 2024):

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

@lunny commented on GitHub (Aug 28, 2024): Maybe we should rewrite these logic with Go code to avoid inconsistent between shell script commands.
Author
Owner

@denyskon commented on GitHub (Aug 28, 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.

@denyskon commented on GitHub (Aug 28, 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.
Author
Owner

@lunny commented on GitHub (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.

@lunny commented on GitHub (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 in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13268