Brazilian Portuguese translation

(J. Bruni) #1

I am about to begin translating Discourse to Brazilian Portuguese. I will use this topic for questions and civilized discourse about it. Let’s start:

1- Is “dev” the appropriate category for this topic? (Why not a new category “translation”?)

2- A standard ISO 639-1 two character code identifies the language, according to Localizing Discourse - but the problem is that pt already corresponds to the European Portuguese translation. Usually, pt-BR is used, mixing ISO 639 and ISO 3166, to identify the Brazilian Portuguese. So… what should I do???

That’s all, by now. Thanks!

Transifex translation for admin content, faq, etc
(J. Bruni) #2

Well… I can see these at config/locales:


So, I suppose I can simply proceed with pt_BR

(J. Bruni) #3

Hey! This is fun… it seems exactly while I was announcing and starting the translation, another pt_BR translation was being committed: Adding Portuguese-Brazil language · discourse/discourse@8c5e0e7 · GitHub

I’ve just invited the translator to join the topic here, but I’m already wondering… what if I prefer some of my translations over his, and vice-versa?

(Camilo Hollanda) #4

Hi @jbruni

And I was looking someone to help me in translation.

I started this work just using Portuguese (PT) translation, and making adjustments to Brazilian Portuguese.

I am using Transifex, which seems to be a nice tool for this work.

Would you agree to work together using this tool?
I could invite you to create a team of translators, starting by me and you, what do you think?

Also we can discuss about translations preferences in this topic.

(J. Bruni) #5


Here is what I was doing:

  1. I made a copy of some files, changing “en” to “pt_BR” in their name:
  • app/views/static/faq.pt_BR.html.erb
  • app/views/static/login.pt_BR.html.erb
  • app/views/static/privacy.pt_BR.html.erb
  • app/views/static/tos.pt_BR.html.erb
  • config/locales/client.pt_BR.yml
  • config/locales/server.pt_BR.yml

  1. I started working in the “config/locales/client.pt_BR.yml” file, backwards. :smile: Because the beginning was a bit confusing, and I was eager to move forward… so, I started at the end of the file, translating from English to (Brazilian) Portuguese. I thought: “I can handle this stuff at the beginning later.”

  2. There were a few spots where the translation would depend on the context… “Reply”… is it “Resposta” (in a header) or “Responder” (in a button)? Without seeing the actual context a few strings seemed difficult to “guess”. So, I decided to translate and play with the application simultaneously.

So, this is my brief history:

  • It is kind of a slow mode translation, but aiming high quality results. (I really want to launch a pt_BR Discourse site ASAP, but I want people to have a nice/pleasant experience, regarding the UX, which includes every help, label, and button text!)

  • I was alone, but now we are two. I wondered how it would work as a team, but I didn’t worry… because I was alone. Now, I don’t need to wonder anymore… we need to plan our workflow.

  • IMO, the European Portuguese translation is unusable for us Brazilians… it may be fine for people @ Portugal… but the differences are many, and going back from that Portuguese to English, and then forward with the actual translation is something I would like to avoid; I strongly prefer to translate directly from English

  • While I translate I imagine the real non-tech users playing with it… “Flag”, for instance, means literally “Bandeira”, but its action, in a button, can be “Sinalizar”… but the helper text really helps when we use “Alertar”… it instantly communicates the purpose and consequences of that button click action… “Sinalizar” will make the user wondering, while “Alertar” cuts away this “wondering” because the word contains the essence of the action in an absolutely clear way…

  • So, I feel I am not doing a literal translation, but a “user experience” translation.

This post is big, I have not answered anything, and opened more issues. :smiley:

(Camilo Hollanda) #6

Hi @jbruni

I’m not an expert translator and actually am not even an expert in the language. I started the job because there was nothing done. I agree with the issues you raised about doing the translation directly from English. In fact it is better. I was not really concerned with high-quality results, because I was too hasty. But I agree that the ultimate goal should be to get high quality results.

In the spirit of the open-source community that is going to evolve the code over time, with the view that everything can be improved.

The questions that you put on “Flag” really caused me any questions at the beginning and at the end I opted “Sinalizar”, but I agree that “Alertar” is the best option.

Another question that occurred to me was in regard to “Bookmark”, I ended up translating as “Adicionar Marcador”, but perhaps not the best option. In web browsers, Bookmarks has been translated as “Favoritos” or “Marcadores”, but in Discourse bookmarks and favorites are two different things.

A workflow that allows us to start from English and at the same time take advantage of what has been done from European Portuguese can be obtained using Transifex.

There you could mark all translations as “Not Reviewed”, and as you go translating from English you mark as Reviewed.

I can continue getting the translations from Transifex and committing, from time to time, as you get advancing in translation.

I added you in Transifex project Discourse-PT-BR

We can work in this way? What do you think?

(Camilo Hollanda) #7

I also added this missing files to Transifex:


But this file is not availabe for translating in actual master branch of Discourse:

Is that correct?

(J. Bruni) #8

Thanks for adding me at the Transifex project!
Right now, I am geting used to the user interface.
I’m playing with it, and I am very well impressed.

I liked that, at each single “snippet” to translate, there is a place to comment/discuss about it. Perfect! We can use it to talk about specific items.

In the other hand, while editing the raw file I can see the specific YAML hierarchy placement, which informs a lot about the context, at Transifex, this information is lost: we only see the snippet to be translated. Anyway, the workaround is as simple as having the file editor opened at another window.

I think YES, we can work this way. Discourse has now a Brazilian Portuguese translation team at Transifex! :smile:

(J. Bruni) #9

I was about to add the static files. You already did it!

Let me check about app/views/static/login.en.html.erb, and eventually add it.

(J. Bruni) #10

app/views/static/login.en.html.erb does not exist anymore, it was recently removed:

Anyway, its “translatable” contents were already moved to config/locales/server.en.yml:

(J. Bruni) #11

@camilohollanda - Eu estava optando por deixar “post” como “post” mesmo, em todos as ocorrências. O que você acha disso? Acho que, assim como “email”, é um termo que já pegou assim, sem tradução.

(Sam Saffron) #12

That file was pointless, the localization happens elsewhere

(Camilo Hollanda) #13

@jbruni - for me it is OK.

I had thought it was weird to use post because the forum I’m using is installed for the elderly people who do not have much experience in internet.

But in general Post’ve picked yes. I agree.

(J. Bruni) #14

Thanks, @camilohollanda.

I’ve researched how people did Wordpress translation of the term “post”, and, indeed, as substantive, “post” is kept unchanged, while as a verb, “publicar” is used. Anyway, there is no absolute rule: each case depends on its context. Take a look:[term]=post&filters[user_login]=&filters[status]=current_or_waiting_or_fuzzy_or_untranslated&filter=Filter&sort[by]=priority&sort[how]=desc

I have completed both FAQ and Privacy Policy translations. You may review them at Transifex. I’ve also added them to my Discourse fork. I want to make a pull request soon, together with the TOS translation, which now is the only “static view” file missing.

I needed to manually merge the file provided automatically by Transifex with the original Discourse files, to keep all formatting, indentation and tags (HTML and others) as they should. So, if we revise and change something at Transifex on these, we need to update the corresponding “erb” file manually. Ok?

(Camilo Hollanda) #15

FAQ and Privacy were both reviewed, I made some changes.

The most important change is about the term “name-calling”, that I know as “xingamentos”.

I guess we’ll need some help from a brazilian lawyer for TOS’ translation.

Yes I saw that the files html.erb were defective after download, including links to FAQ in Privacy file.

A question. We can talk in Portuguese here or it will be offensive to community?

(J. Bruni) #16

I didn’t know that “name-calling” had this meaning. Considering the context, it makes much more sense than “chamar pelo nome”, indeed.

Lawyer? I have not read the TOS yet, but I think we can translate as it is, and then adjust with the lawyer’s input. Do you know anyone who could help?

Portuguese here? I think it is not offensive, but I really don’t know. The advantage of using English is that everybody can easily know what we’re talking about.

Eu acho que não tem problema não a gente usar ambas as línguas aqui: discutir detalhes de tradução em português, e coisas que são legais que todos saibam (tipo um “status update” geral) a gente escreve em inglês.

But let’s see if the community wants everything in English, or not…

(J. Bruni) #17

I’ve already merged the improvements into the “erb” FAQ translation file. (Privacy is unchanged, right?)

I will wait to push to GitHub because I’ve just filled a “bug report”… look:

  • See “latest commit 616754165a”?
  • See “Create privacy.pt_BR.html.erb” commit message?
  • Now click at “History” (top-right corner)
  • See the latest commit SHA is “af8ea2d87d” and message is “Brazilian Portuguese translation (Privacy)”?

So… Discourse making me find bugs at GitHub! :bug: I’ve sent them the detailed steps to reproduce, and it’s better wait until they see it before I make changes.

Translation Tools: Transifex? Localeapp?
(J. Bruni) #18

Everything ok at GitHub now. TOS translation review completed. I will merge it into the “erb” file, push to the repo, and open a pull request with the three static files translation.

Next: review the client/server translations - indeed, the most important part.


(Camilo Hollanda) #19


OK, sorry, just saw your message now.

Transifex automatically gets updates to original files from discourse at github.

So in addition to updating we have new terms to translate.

Changing “postagens” to “posts” is best done via text editor, and then we can send it to Transifex to do the merge.

Same for “alertas” instead of “sinalizações”.

How do you wanna do this? Have you started working on this client / server YML files?

(J. Bruni) #20

Great! Let’s see:

  1. Very good to know that Transifex does this automatic update, integrated with GitHub. I expect it also notifies us about… do we receive a notification email when a translatable file is updated?

  2. When merging the Transifex provided TOS translation with the “final” .html.erb file for upload (pull request), I did several minor tweaks in the translation. So, what we have in Transifex is not “in sync” with the actual pt_BR translation already merged to Discourse master.

    Both Discourse and Transifex staff has been notified about the “erb” file issues: Translation Tools: Transifex? Localeapp?

  3. NEW: I have just logged into Transifex and acknowledged that new versions of a couple of files were there. So, it means it does not automatically notify us. I searched for an option to activate it, but I haven’t found one.

  4. NEW: I have just uploaded to Transifex the actual “final pt_BR.html.erb files” which were manually merged and which are actually in the Discourse repository master branch. I have not tried uploading before (I only used the web interface), and I expect this action to have properly synchronized the translations.

    While we don’t have a better way to deal with the file format issues, I think this process is fine, right? I mean: translate :arrow_forward: download :arrow_forward: manually merge :arrow_forward: upload and pull request.

  5. FINALLY: I’m being hired for a development project, suddenly my available time shrinked, and this is why I have not dealed with client/server YML files yet. In the other hand, I wanted to complete until the end the app/views/static files before proceeding, and this has been successfully accomplished.

    So, now, even not as available as before, I’m still engajed in the translation. Let’s see how much progress I will be able to do in this weekend. I will keep my Discourse install instance open (where I can use the Admin UI), while reviewing the YML file translations, either through Transifex or directly in the YML files. I do want to go through the whole thing, and with the kind support offered by you and others here, I feel motivated, encouraged and confident to do so.

Please keep letting me know of any suggestions, comments, opinions or anything else related to the subject. Thanks!