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

French translation updated #201

Merged
merged 3 commits into from
Oct 27, 2023
Merged

French translation updated #201

merged 3 commits into from
Oct 27, 2023

Conversation

Luc-Webster
Copy link
Contributor

No description provided.

@riosukisan
Copy link
Contributor

I don't know how to put a pull here, but I wanted to do a Portuguese translation of Phira, I really loved the game, but I wanted to know how to translate it. If devs read this, I'd appreciate it, because I'm from Brazil and I recommended it to a friend of mine

@YuevUwU
Copy link
Contributor

YuevUwU commented Oct 27, 2023

(Edited on Nov. 5)

Before you add a new locale

Locale format (Unofficial)

According to Wikipedia, the naming format of phira locale code may be:

lowercase ISO 639-1 + "-" + UPPERCASE ISO 3166-1 alpha-2

For example: zh-CN, en-US, jp-JP, vi-VN. Instead of zh-Hans based on ISO 15924 unless necessary.
Microsoft's locale selection page may be able to give you some suggestions.

Table of Contents (Sort from simple to advanced)

Thanks for everyone's help in suggesting methods

CLI ver. (Original)

Click here

(Translate by Google Translate)
Although I'm not the developer of phira and just started working as a translator 3 months ago, I think I might be able to help you (I'll try to be more detailed since I don't know your level):

Search your locale code

According to Wikipedia, the naming format of phira locale code may be:

lowercase ISO 639-1 + "-" + UPPERCASE ISO 3166-1 alpha-2

Microsoft's locale selection page may be able to give you some suggestions.

If you want to create other languages, please replace pt-BR below with your locale code, and replace riosukisan with your username.

See Also: https://docs.github.com/en/get-started/quickstart/github-flow

Create an issue

First of all, it is recommended to create an Issue and tell the developers you want to use a new language translation (You just need to create it before the first translation), and then you can continue to the next step. When the developer refuses, you can still pause or continue immediately. You can also build it yourself, but you need static-lib as dependency, see #152

  1. Go to https://github.com/TeamFlos/phira/issues, click New Issue
  2. Enter the title and description, the more specific the better, the "comment" field uses Markdown syntax
  3. Submit new issue

Start your translation journey

Setup your enviroment

According to @riosukisan, the translation you/he/she want should be pt-BR.

See also: https://docs.github.com/en/get-started/quickstart/contributing-to-projects

  1. Let's get back to https://github.com/TeamFlos/phira.
  2. Click the Fork button near the top. It should create a repository at https://github.com/riosukisan/phira
  3. Complete the three steps here
  4. Open your terminal and type git clone https://github.com/riosukisan/phira.git.
    It will create the phira folder and copy data from repo in your current directory
  5. Enter cd phira to enter the above folder
  6. Open your favorite editor or IDE and create the following folders:
  • [repo_dir]/phira/locales/pt-BR
  • [repo_dir]/prpr/locales/pt-BR
  1. Copy [repo_dir]/phira/locales/en-US/ (not including the en-US folder itself) to [repo_dir]/phira/locales/pt-BR
  2. Copy [repo_dir]/prpr/locales/en-US/ (not including the en-US folder itself) to [repo_dir]/prpr/locales/pt-BR
  3. Translate!

==Notice==

  • The translation you need to modify is generally only the value after "=", and please do not intentionally break lines.
  • Some exceptions are {} or $ for rust. I believe you can find some rules from some parts of the translation of zh-CN which shouldn't be changed
  • Some of them are retained in English when we translate them into Chinese. This is no longer the case. You can also read more in other languages.

Create a branch (Recommended but not required)

See: https://docs.github.com/en/get-started/quickstart/contributing-to-projects#creating-a-branch-to-work-on

If you decide to do this step, please change the repo webpage given below from main to your branch.

Commit and Push

See also: https://docs.github.com/en/get-started/quickstart/contributing-to-projects#making-and-pushing-changes

After making the changes, let’s submit the changes (commit)

  1. git add path/file will add specified file to the staging area which include the file you will push

I usually use git add -A to stage all modified files, or you can use the IDE's own feature.
Some people like to make one commit per file, and these can be chosen according to personal preference.

  1. git status, as the name suggests, means checking the current progress.
  2. git commit -m description will set the description of the commit (please use "" or '' to clamp the text), you can find it here intuitively see what commit is
  3. After a lot of hard work, let’s git push to online~

Create Pull Request

See also: https://docs.github.com/en/get-started/quickstart/contributing-to-projects#making-a-pull-request

  1. Go back to https://github.com/riosukisan/phira
  2. you should find a green button similar to Compare & Pull Request. If not, click Contribute > Open pull request
  3. You can optionally write some description and Create pull request
  4. Then just wait for the developers, if they merge, you're successful!

Then, developers may modify l10n.rs etc. for you to make Portuguese(or your language) be able to choose
Thus, just focus on your translation

Post-maintenance

Don’t forget to check back often to see if the zh-CN and en-US translations have been updated.
If so, you want to translate them on a whim.

  1. Go back to https://github.com/riosukisan/phira, click Sync fork
  • click Compare to view the differences with the original repository
  • click Update branch to update to the latest version
  1. If you encounter a conflict, GOOGLING. It is really rare, unless it is not in the Update branch and your previous Pull Request has not been accepted. For example: my another translation branch has conflicts because too many differents.
  2. Just repeat the steps

There are many thing I haven't mention such as create a branch(optional). Their are some note:

and more on google...
Wish you the best of luck!

@sjfhsjfh sjfhsjfh added the good first issue Good for newcomers label Oct 27, 2023
@sjfhsjfh sjfhsjfh merged commit c524487 into TeamFlos:main Oct 27, 2023
@riosukisan
Copy link
Contributor

Now I'm screwed, I don't know anything about programming, I thought it would be done in a text file, which in my opinion would be easier to translate. I'm sorry

@sjfhsjfh
Copy link
Contributor

sjfhsjfh commented Oct 28, 2023

@riosukisan In short you can just create your fork, download the zip, and then just use any text editor to translate the .ftl files
However, these files would update so you have to download the sourcecode zip every time. The better solution is to use a version control tool named Git, there's also GUI clients for you if you're not familiar with command lines, just choose the one you like.

So the steps are just simple:

  1. click fork to create your copy of the repository (just use the default setting in the pic if you're not sure)
图片
  1. Clone your forked repo to your computer using git client
  2. Then create folders phira/phira/locales/pt-BR and phira/prpr/locales/pt-BR (where you can find other languages), and do your translation
  3. "Commit" your changes(confirm) locally and push(sync) it to your remote repo(your phira fork on GitHub), Now you should see something like this in your forked repo Homepage
图片
  1. Contribute and open a pull request to let us know 😎 we will add your translation to phira as soon as your translation is checked

@YuevUwU
Copy link
Contributor

YuevUwU commented Oct 30, 2023

@riosukisan
There is a tutorial with Github Desktop.
I hope the rhythm is appropriate.
At present, this video is just a version that was edited in a hurry.

[Unofficial] How to add translation in Phira

@kqakqakqa
Copy link

Now I'm screwed, I don't know anything about programming, I thought it would be done in a text file, which in my opinion would be easier to translate. I'm sorry

@riosukisan

You'll need to fork files -> change files -> merge files.

Here is a simple way and doesn't need programming:


  • Download the file
  • Unzip the file, and enter prpr\locales folder
  • Choose one, copy, and rename as pt-BR

  • Translate them

  • Fork before uploading
  • Upload files at your forked branch
  • Change the path to prpr/locales/pt-BR
  • Upload your translation files, and commit
  • Create a Pull Request to merge your changes

@riosukisan
Copy link
Contributor

I already finished the translation, and sent it to my github account, if it wasn't on mine I'm sorry, you could have said, "send it to my account" or "send it to your account"
Screenshot_20231031-154917_Chrome

@YuevUwU
Copy link
Contributor

YuevUwU commented Oct 31, 2023

@riosukisan
Great! But
There is something you need to do

  • Rename pt-br to pt-BR to ensure consistency in the local directory.
  • Fork TeamFlos/phira instead of creating a new repository.
    Since you have created a repository named phira, you may consider renaming it when forking, or deleting the repository directly.
    You can find the tutorial in Step 2 of my video.
    You must fork the official repository to make pull requests on it.
  • translate phira/locales/pt-BR. You can upload twice because you have two directory in different locations. When you upload files under phira/locales/pt-BR, you need to change the path to phira/locales/pt-BR. Just like kqakqakqa's tutorial.
    IMPORTANT: Download your zip from the fork repo or official repo
    Not to translate with release archive, because 4d4a003 changed something since 0.5.0 released
    You can check Step 1 of kqakqakqa's tutorial

@riosukisan
Copy link
Contributor

Hello again, my notebook ended up having a battery problem and I sent it for repair. I don't know when I'll get it again because I had to import a new battery.
Can you do this step 2 if I send you the file?

@YuevUwU
Copy link
Contributor

YuevUwU commented Nov 4, 2023

@riosukisan Yes, of course. But how do you send me these file, Google Drive?

@riosukisan
Copy link
Contributor

https://drive.google.com/file/d/1fiYqNgcP1d0wjs3jDxTyAc7sZYWW6CAn/view?usp=drivesdk
Sorry for taking so long to respond, just unzip the zip file

@sjfhsjfh
Copy link
Contributor

sjfhsjfh commented Nov 5, 2023

@riosukisan Try join the discord server

@riosukisan
Copy link
Contributor

I already logged into the server

@kqakqakqa
Copy link

I already logged into the server

@riosukisan You can upload files at https://github.com/kqakqakqa/phira/tree/main/prpr/locales/pt-BR if you want. Permissions are given.

@YuevUwU
Copy link
Contributor

YuevUwU commented Nov 9, 2023

@kqakqakqa
sfjhsfjh与我们讨论的结果是让他自己来,目前我认为他已经有能力创建存储库和提PR了,此举是为了让他保有contributor的身份
至于他只有翻译prpr这件事,他也承诺会翻phira,但我认为这需要一段时间
欢迎利用以上链接加入phira的Discord咱们再行讨论
「常规」频道内有我们的对话纪录
留在这里我也不确定Luc Webster有没有关通知

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants