[comixed-dev] Re: Multiple language support

  • From: "Darryl L. Pierce" <mcpierce@xxxxxxxxx>
  • To: comixed-dev@xxxxxxxxxxxxx
  • Date: Sun, 14 Jun 2020 08:43:24 -0400

Git's a tough tool sometimes, but with a few tricks I've learned I can
definitely help out.

I apologize if I got the PR and the issue numbers confused. Chalk it up to
being way too tired yesterday from working my day job. :D But you're
correct, it should reference #332 (the issue) and not the PR.

One thing I would definitely need you to do is combine all three commits
into a single commit in this case: since it's one full translation change,
we should keep it to a single commit.

What we want to do is combine all three into a single commit by merging the
2nd and 3rd commits into the first one. To do that, you can use the
following commands:

1. Be in your branch.
2. Start an interactive rebase with: $ git rebase -i develop
You should see something like this:

    pick 69b150002 Added Spanish translation (incomplete - ongoing) [#332]
    pick 5283b0e6e Added Spanish translataion continued [#332]
    pick 2c233768a Fixed missing bracket [#332]

Edit the second and third lines, changing "pick" to "fixup", so that it
looks like this:

    pick 69b150002 Added Spanish translation (incomplete - ongoing) [#332]
    fixup 5283b0e6e Added Spanish translataion continued [#332]
    fixup 2c233768a Fixed missing bracket [#332]

Now when you save this, those two commits will get squashed into the first
one. Then you can use "git commit --amend" afterward to change the commit
message.

For the git commit message, what I'm asking for is for the first line of
the comit message to be something like this:

    Added initial Spanish language translation [#332]

When we create a release, there's a tool used to create the CHANGELOG.md
file. I looks at the commit messages for those six keywords mentioned in
CONTRIBUTING.md [1], under the Commit Template heading. So it looks for
words like "Added" to include a feature,"Fixed" to include bug fixes, etc.

[1] https://github.com/comixed/comixed/blob/develop/CONTRIBUTING.md

For the translation itself, I understand what you're saying about the
irregular adjective. However, the issue is more technical: the tool we're
using to manage the translations can't handle those single quotes in a
select and it's causing it to fail.

Lastly, please be sure to put yourself into the CONTRIBUTORS.md file as a
part of your PR since you're now contributing to the project. I want to
make sure you get credit there as well as in the code. :D

On Sun, Jun 14, 2020 at 5:38 AM Arturo Pérez Mulas <
theotocopulitos@xxxxxxxxx> wrote:

Hey, Darryl...

I saw your comments for the PR. Sorry, I am not that familiar with github,
I've basically used it for personal projects... Learning as I go.

I solved almost all issues you mentioned, but wanted to discuss about a
couple of them:
.

- You requested me to cite [#348], which is the PR, but looking at other
PRs, I saw they were citing the issue that gave reason for them, so I cited
[#332] instead... Is this ok? Otherwise I will ammend those

- You requested to remove the single quotes in 'bloqueado' /
'desbloqueado'. Before doing so, let me explain why I put those there, and
let me know what you think:

 In English, you are using sentences like, "Mark pages Blocked"... the
capital B somehow singles "Blocked" as an special status.
 In Spanish,  it is incorrect using capitals in the sentences like that,
and "bloquear"/"bloqueado" is a rather generic word, which in this context
takes a special meaning, so I thought showing them between single quotes
would make more sense for the Spanish user. I know it is not standard in
comixed, so, if you think that will not work, I'll go ahead and remove those



On Sat, Jun 13, 2020 at 2:01 PM Darryl L. Pierce <mcpierce@xxxxxxxxx>
wrote:

The best way is to create a fork and submit PRs as you mention. The
central repo doesn't allow commits directly to any branches.

On Sat, Jun 13, 2020 at 7:48 AM Arturo Pérez Mulas <
theotocopulitos@xxxxxxxxx> wrote:

Hey, Darryl,

How do I go about adding my translations... should I fork and make a PR,
or just commit directly to the develop branch in the main repository?

On Wed, Jun 10, 2020 at 8:59 PM Arturo Pérez Mulas <
theotocopulitos@xxxxxxxxx> wrote:

Thanks!


On Wed, Jun 10, 2020 at 8:36 PM Darryl L. Pierce <mcpierce@xxxxxxxxx>
wrote:

I've started on the first 0.7 feature by checking in today the
different sets of files to support other languages. There are now
directories containing the files to be translated into French and Spanish.

For doing the translations, the project uses a tool named
ngx-translate-messageformat-compiler [1] that supports having plurals and
other things in the translations. They're not difficult to use, and the
English translation takes advantage of them. But I can help if there are
any questions.

[1] https://github.com/lephyrus/ngx-translate-messageformat-compiler

--
Darryl L. Pierce <mcpierce@xxxxxxxxx>
"Le centre du monde est partout." - Blaise Pascal
"Let's try and find some point of transcendence and leap together." -
Gord Downie



--
Darryl L. Pierce <mcpierce@xxxxxxxxx>
"Le centre du monde est partout." - Blaise Pascal
"Let's try and find some point of transcendence and leap together." -
Gord Downie



-- 
Darryl L. Pierce <mcpierce@xxxxxxxxx>
"Le centre du monde est partout." - Blaise Pascal
"Let's try and find some point of transcendence and leap together." - Gord
Downie

Other related posts: