Começando com a internacionalização¶
Tem um projeto e quer traduzi-lo para vários idiomas? Este guia o ajudará a fazer isso. Várias situações típicas são apresentadas, mas a maioria dos exemplos são genéricos e podem ser aplicados a outros cenários também.
Antes de traduzir qualquer software, você deve perceber que os idiomas ao redor do mundo são realmente diferentes e não deve fazer nenhuma suposição com base em sua experiência. Para a maioria dos idiomas, parecerá estranho se você tentar concatenar uma frase de segmentos traduzidos. Você também deve lidar adequadamente com formas plurais porque muitos idiomas têm regras complexas para isso e a estrutura de internacionalização que você acaba usando deve oferecer suporte a isso.
Por último, mas não menos importante, às vezes pode ser necessário adicionar algum contexto ao texto traduzido. Imagine que um tradutor receberia o texto Sun para traduzir. Sem contexto, a maioria das pessoas traduziria isso como nossa estrela mais próxima, mas pode ser usado como uma abreviatura para domingo.
Escolhendo a estrutura de internacionalização¶
Escolha o que for padrão em sua plataforma, tente evitar reinventar a roda criando sua própria estrutura para lidar com localizações. Weblate tem suporte à maioria dos frameworks amplamente usados, consulte Formatos de arquivo de localização para mais informações (especialmente Capacidades dos tipos de tradução).
Nossa recomendação pessoal para algumas plataformas está na tabela a seguir. Isso se baseia em nossa experiência, mas não pode abranger todos os casos de uso, portanto, sempre considere seu ambiente ao fazer a escolha.
Plataforma |
Formato recomendado |
|---|---|
Android |
|
iOS |
|
Qt |
|
Python |
|
PHP |
|
C/C++ |
|
C# |
|
Perl |
|
Ruby |
|
Extensões da Web |
|
Java |
|
JavaScript |
O fluxo de trabalho mais detalhado para alguns formatos é descrito nos capítulos a seguir:
Ver também
Educating developers for proper internationalization¶
Software internationalization is not just about being able to translate strings but about making the whole software look native to a user from another country. This also includes things like date or number formatting, currency display, or inputting text in the right direction. Most software frameworks have good support for this, so please follow their instructions for all these areas.
The string translation might not be a straightforward task as well. This is especially true for short strings like captions or button labels. Different languages have different rules, and it is not reasonable to expect that the same string will always be translated the same. In many situations it also might not be clear how to translate, and it is even challenging to distinguish whether the word is a verb or a noun.
All developers should understand this and uniquely identify strings used in
different scopes. For example, None meaning “no users” might be translated
differently from None meaning “no items”. Use different keys or contexts to
distinguish these terms for translators. You can provide additional context in
Weblate, such as Screenshots and visual context or Explicação.
The technical side is only part of the work. Translators also notice the project workflow around strings, releases, and communication. A few practices make collaboration much easier:
Respond to translator questions and comments, and make sure the advertised contact channel is actually monitored.
Avoid unnecessary churn in source strings. Rewording or replacing existing strings without a user-visible reason creates avoidable translation work.
Add enough context for translators to understand short or ambiguous strings. Avoid concatenating sentences from fragments, use placeholders that can be reordered, and rely on built-in plural handling.
Ship translations regularly so completed work does not stay unused in Weblate for long periods.
Communicate workflow or policy changes, and keep contribution requirements realistic for smaller language teams.
If a project is no longer maintained, reflect that in the translation workflow instead of leaving components open indefinitely.
Weblate can help with some of these issues. In particular, regular automatic commits from Weblate make translation progress visible in the source code history and reduce the risk that finished work is forgotten before a release. See Tradução contínua for automation options.
Ver também