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

[ Mail ] Render title #31108

Closed
Sharaf5 opened this issue May 27, 2024 · 3 comments
Closed

[ Mail ] Render title #31108

Sharaf5 opened this issue May 27, 2024 · 3 comments
Assignees
Labels
good first issue Likely to be an easy fix proposal/accepted We have reviewed the proposal and agree that it should be implemented like that/at all. type/enhancement An improvement of existing functionality type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@Sharaf5
Copy link

Sharaf5 commented May 27, 2024

Description

Rigistration email title is alway "Welcome to gitea" even with my instance AppName is "DevOps"

issue Regen :
Start any gitea instance

  • make sure AppName is anything rather than gitea
  • make sure mail is enabled and functional
    create new user and check Send user registiratiin notification
    check the mail body you would find your AppName
    check the mail title you would find Welcome to gitea

I tried looking for local translation, then understood it's hard coded in locals
however I don't see where the title is renderd in code : seems title is always static
Any way to make it render this title for the site name itself

Gitea Version

1.22.0-rc1

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

Screenshot_20240527_162313

Git Version

No response

Operating System

dockerized

How are you running Gitea?

inside docker

Database

None

@lunny lunny added type/enhancement An improvement of existing functionality type/proposal The new feature has not been accepted yet but needs to be discussed first. proposal/accepted We have reviewed the proposal and agree that it should be implemented like that/at all. and removed type/bug labels May 27, 2024
@Sharaf5 Sharaf5 changed the title [ Mail ] Render title with [ Mail ] Render title May 27, 2024
@silverwind silverwind added the good first issue Likely to be an easy fix label May 29, 2024
@SunnyWan59
Copy link
Contributor

Is it possible for me to work on this?

6543 added a commit that referenced this issue Jul 11, 2024
I changed the title of the registation email from "Welcome to Gitea" to
"Welcome to (appname)". I did this by substituting 'Gitea' in
register_notify to %s and formating the registration title in mail.go. I
changed this for all the languages I could, but I struggled to changed
the translation file for Farsi. I have attached the screenshots of
before and after and the related issue below.

Related issue:
#31108

Before change:
![Screenshot from 2024-07-04
22-32-17](https://github.com/go-gitea/gitea/assets/94445569/4178b51c-1acc-45f4-9750-dff41564a709)

After:
![Screenshot from 2024-07-04
22-32-01](https://github.com/go-gitea/gitea/assets/94445569/9cd7a58d-c0f5-4a3c-a66c-805c55411eaa)

---------

Signed-off-by: Sunny Wan <Sunnywan2020@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
DennisRasey pushed a commit to DennisRasey/forgejo that referenced this issue Jul 16, 2024
I changed the title of the registation email from "Welcome to Gitea" to
"Welcome to (appname)". I did this by substituting 'Gitea' in
register_notify to %s and formating the registration title in mail.go. I
changed this for all the languages I could, but I struggled to changed
the translation file for Farsi. I have attached the screenshots of
before and after and the related issue below.

Related issue:
go-gitea/gitea#31108

Before change:
![Screenshot from 2024-07-04
22-32-17](https://github.com/go-gitea/gitea/assets/94445569/4178b51c-1acc-45f4-9750-dff41564a709)

After:
![Screenshot from 2024-07-04
22-32-01](https://github.com/go-gitea/gitea/assets/94445569/9cd7a58d-c0f5-4a3c-a66c-805c55411eaa)

---------

Signed-off-by: Sunny Wan <Sunnywan2020@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
(cherry picked from commit 4913edaa70a48f7c5a524f680ca921ed515d6ec2)

Conflicts:
	- options/locale/locale_en-US.ini
      Applied the change manually. Confliced because we don't have `register_notify.title`.
	- services/mailer/mail.go
      Adapted the change to Forgejo. We don't have `u.EmailTo` due to
      not picking gitea#31527 (yet).
@kemzeb
Copy link
Contributor

kemzeb commented Aug 31, 2024

Does #31562 close this issue?

@6543
Copy link
Member

6543 commented Aug 31, 2024

Yes

@6543 6543 closed this as completed Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Likely to be an easy fix proposal/accepted We have reviewed the proposal and agree that it should be implemented like that/at all. type/enhancement An improvement of existing functionality type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

6 participants