Skip to content

Conversation

@M-DinhHoangViet
Copy link
Contributor

@M-DinhHoangViet M-DinhHoangViet commented Oct 31, 2023

docker compose run --rm ui bash -c "/lila/bin/trans-dump"
docker compose restart lila
cd /workspace/lila-docker
./lila-docker format

Copy link
Collaborator

@ornicar ornicar left a comment

Choose a reason for hiding this comment

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

Smaller PRs that only change things in one area are preferred, but this is ok.

@M-DinhHoangViet
Copy link
Contributor Author

If so, can I create another pull request? I'm afraid this pull request will have conflicts.

@ornicar
Copy link
Collaborator

ornicar commented Oct 31, 2023

Why don't you just add commits to this one?

@M-DinhHoangViet M-DinhHoangViet marked this pull request as draft October 31, 2023 23:18
@fitztrev
Copy link
Member

fitztrev commented Nov 4, 2023

@M-DinhHoangViet Can you create a development site using the steps below to test your changes?

Here is a quick overview video first: https://www.youtube.com/watch?v=imuo-d5vGS8

To specifically work on translations, you can do these steps:

Start the workspace

  1. go to https://github.com/lichess-org/lila-gitpod
  2. click the "Open in Gitpod" button
  3. sign in with Github and click "Continue" when prompted to start a workspace
  4. it will take about 10-15 minutes. when it's ready, you'll have a Lichess dev site that you can make changes to
  5. Wait till you see the site loaded before continuing

Add a translation

  1. Within your workspace, open the lila repo by typing open repos/lila in the terminal at the bottom
  2. In the workspace's file browser, open app/views/simul/homeInner.scala and make this change:
- a(href := routes.Auth.signup, cls := "action button text")("Sign up to host or join a simul")
+ a(href := routes.Auth.signup, cls := "action button text")(trans.signUpToHostOrJoinASimul())
  1. Open translation/source/site.xml and add this line:
<string name="signUpToHostOrJoinASimul">[using translated value]</string>
  1. Run this command, which will automatically update the I18nKeys.scala file. You do not need to manually edit that file.
docker compose run --rm ui bash -c "/lila/bin/trans-dump"
  1. Run this command for the changes to be applied:
docker compose restart lila
  1. Run this command and visit the link it returns to see if it worked:
echo $(gp url 8080)/simul

You should see this in the button to verify that it worked:
image

Repeat those steps for each of the strings you want to translate.

@M-DinhHoangViet
Copy link
Contributor Author

I understand, thanks @fitztrev. But my problem is that the translations should be minimized in one go

@fitztrev
Copy link
Member

fitztrev commented Nov 4, 2023

Yes, do those steps but only edit 1 of the scala files. In this example, only edit simul/homeInner.scala and not faq.scala.

Then submit that as its own pull request. Wait for it to get approved, then move onto another file.

@M-DinhHoangViet M-DinhHoangViet marked this pull request as ready for review November 5, 2023 07:24
),
h3("Google Chrome (", desktop(), "):"),
p(
browsersGoogleChrome
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also this line is wrong, do my changes match what you mean @ornicar?

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
browsersGoogleChrome
browsersGoogleChrome()

Copy link
Member

@fitztrev fitztrev left a comment

Choose a reason for hiding this comment

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

Can this content stay as 3 separate paragraphs? (lichess.org on left, your changes on right)

image

Can you start a dev site on Gitpod and test the changes? Compare the page side-by-side with what is on lichess.org and make sure they are the same.

@M-DinhHoangViet
Copy link
Contributor Author

Can this content stay as 3 separate paragraphs? (lichess.org on left, your changes on right)

image

Can you start a dev site on Gitpod and test the changes? Compare the page side-by-side with what is on lichess.org and make sure they are the same.

I checked in Gitpod and maybe it was because I looked when it hadn't finished rebooting. I will reconsider

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants