Translations: Find a mechanism to detect and prevent certain strings or markup from being modified

オープン
#1,450 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
godot

調査の方向性

Start by reading the existing translation filters and glossary tag reconstruction mentioned in the issue, then trace where strings are extracted and where tr() is applied. Compare how inline code and BBCode markup behave across translations; done means a reusable approach protects untranslatable text and can validate or repair malformed markup across languages.

索引モデルが issue の本文から書いたものです。

説明

There are a couple of labels across the application that should never be translated. E.g. code. We filter out many of them already, but we don't have an exhaustive filter mechanism.

Notably, there are sometimes pieces of inline code in certain scenes or tags within a paragraph.

We probably need multiple mechanisms to protect those:

  • A way to parse and verify the structure of the bbcode markup, and not only ensure that the structure is valid, but actually force reconstruct, or replace borked parts, if any, in the translation. The application already does that to a limited extent (i.e. reconstructing glossary tags), but this should be a tool usable in this repository across all languages.
  • One to several ways to mark parts as untranslatable and filter them out of translation strings and never apply the translation function tr() at runtime or build time to those. There are different strategies like we can use placeholders (%s) in some strings, literal markup or filters. None of these, however, completely shield the markup.

We already do have some of that, but I'm opening an issue to take some time and address it more systematically.

Ideas

Because we generate lesson files at build time, one thing that we could do is parse the BBCode and ensure that the strings are structurally the same. For anything like inline code or glossary tags, for the tags themselves, to always reconstruct them from the parser and only copy terms in between.

主要言語
GDScript
スター
2.8k
フォーク
239
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

GDQuest/learn-gdscript のほかの issue

GDQuest/learn-gdscript の issue をすべて見る

似ている issue

Internationalization の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。