Skip to content

French translation updated#201

Merged
sjfhsjfh merged 3 commits intoTeamFlos:mainfrom
Luc-Webster:main
Oct 27, 2023
Merged

French translation updated#201
sjfhsjfh merged 3 commits intoTeamFlos:mainfrom
Luc-Webster:main

Conversation

@Luc-Webster
Copy link
Copy Markdown
Contributor

No description provided.

@riosukisan
Copy link
Copy Markdown
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
Copy Markdown
Contributor

YuevUwU commented Oct 27, 2023

(Edited on Mar. 24, 2026)

[NEW] Weblate

Phira's Weblate (a translation platform) is now available. It may be more friendly for translators, especially to find untranslated strings.

Site: https://hosted.weblate.org/projects/phira/

Setup

  1. Register or Login in the Hosted Weblate (Recommends: Login with GitHub, weblate translations are a git repo, and this can help to write author name)
  2. Configure the [Language Settings].
    Looks the small description under the text.
    "Secondary languages" enables to show the existing translation for the string in the specific language in the translation editor.
  3. (Optional) Setting "Notifications" if you want to receive translation updates for watched projects
    You can watch Phira in top-right of project
  4. And then...Explore it and features (?), or see the documentation for unclear question, or ask AI.

Some Advice

Update Translations

Note: zh-CN ≈ Chinese (Simplified Han script)

  • The current en-US translation is just modified on v0.6.7, which is now semi-official . If allowed, please refer to the zh-CN string.

  • zh-CN and your secondary language will be showed in the editor. (See "Setup" above)

  • "Nearby String" will only show "id" "source language" "your language" 💀

  • Don't scare the "Failing Check". It's aggressive and greedy to find problem, so there may be many expected but fake-positive.

  • If source string (zh-CN) changes, weblate will mark other language strings as "Need editing" if there is recorded source strings changes, you will need to review and uncheck it, but old translation may still can be push to this repo.

    • NOTICE: Weblate won't fetch the history before Mar. 24 (init).
      The content of source strings (zh-CN) may be changed before.
      These may not seen as "Need editing".
      Have better to fully review again if you haven't translated them for a long time.
      There is some example recorded in [ci] CI-l10n doesn't cover the translation changes on the same fluent id (FUZZY) #692 . A full list may be released if I remember....
      (The official looks like they will release phira at any time.)
      To see the source string changes, please check or git diff/compare on zh-CN.

Add Language

  • Just try to tap "+" and new a language. Locale code determination may be processed on update by the official...(?)

Phira Official Translation Synchronization Process

(Note: This is the official need to do, not translator)
(NOTICE: This process was asked to the official team right after they just publicly announced their Weblate. There may be some adjustments.)

  • The changes in repo will automatically sync with Weblate. So, the PR method is still able to use.
  • The official will manually pull the Weblate translations.
  • The official source language is zh-CN, not en-US. en-US can be edited by community.

Migrate GitHub PR / Files to Weblate

  • [Languages] > [<Your Language>] > [Components] > [<The component correspond to filename>] > [Files] > [Upload Translation] > ...

[Legacy] Pull Requests

Before you add a new locale

Locale / Directory Naming Convention (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.

Fluent Syntax

Each translation file with suffix .ftl is ProjectFluent format
Looks like this

# Verify your grammar here:
#   https://projectfluent.org/play/

# Comments will be ignored (starts by #, there is 3 or 4 comment type)
# https://projectfluent.org/fluent/guide/comments.html

# NOTICE: Please don't modify the identifier
this-is-identifier = This is the message to translate

# NOTICE: Please don't modify the placeables like { $identifier }
# You can move the position to fit your language grammar
# `/en-US/ui.ftl`
item-count = You have { $count } item(s)
# `/ja-JP/ui.ftl`
item-count = { $count }つのアイテムがあります

# For multiline translation string, please keep the indentations
about-content =
    Phira v{ $version }
    Social media:
        BiliBili Account: @Phira官方

    Phira is a non-commercial community-driven rhythm game inspired by Phigros.
# ^^ These are indentations, which marks they are the same strings.
# https://projectfluent.org/fluent/guide/multiline.html

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!

After Submit PR

According to the Phira repository config,
your pull requests (PR) will need to be approved by who can direct commit in main branch.
In other words, your PR requires to be reviewed and approved by at least @Mivik or @sjfhsjfh before it can be merged.

If you are ready to review: (ping = mention = at = @)

  • If no one reviews your code for a long time, ping @sjfhsjfh optionally
  • If someone reviews you and give suggestions, re-request review or ping the original reviewer.
    • If he/she/... didn't re-review for 3 days, consider to ping @sjfhsjfh
  • If AI reviews your code, ping @sjfhsjfh
  • If you don't know who to ping, ping @sjfhsjfh

@sjfhsjfh sjfhsjfh merged commit c524487 into TeamFlos:main Oct 27, 2023
@riosukisan
Copy link
Copy Markdown
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

@YuevUwU
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

YuevUwU commented Nov 4, 2023

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

@riosukisan
Copy link
Copy Markdown
Contributor

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

@riosukisan
Copy link
Copy Markdown
Contributor

I already logged into the server

@kqakqakqa
Copy link
Copy Markdown

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
Copy Markdown
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.

4 participants