Plain text
Translate a text file line by line so the translation keeps every line of the source in place.
Plain-text files such as app store descriptions and release notes have no markup and no keys. The txt file handler translates each line on its own and writes the translation back in place, so the target has exactly the lines of the source.
Lines and units #
For example:
Plan your trips offline.
• Download maps for any region
• Share routes with friendsEach line with text becomes one translation unit, keyed by its line number. Here lines 1, 3, and 4 are translated. A blank line, or a line of only spaces or tabs, is not a unit and is copied as it is.
The spaces and tabs at the start and end of a line stay outside the unit, so indentation and trailing spaces survive translation. Only the text between them is translated.
Reconstructed output #
Output replaces the text of each line in the current source and keeps everything else byte for byte: blank lines, indentation, each line's own ending (LF or CRLF, mixed endings included), and whether the file ends with a newline. The target therefore has as many lines as the source.
Spaces and line breaks around a translation are dropped, and a line break inside it is replaced by a single space, so a translation never adds a line. An empty translation fails output assembly for that locale.
Reuse matches unchanged line text and its place in the file, as for SubRip cues. Changing a line's indentation does not require retranslation. When lines are added or removed, a line whose text appears once in the file keeps its translation, while a line whose text appears more than once is translated again. A target whose line count differs from the previous source supplies no reusable text, so keep the previous source paired with its accepted target.
Configure and check the text #
The CLI and the GitHub App infer txt from .txt. A .txt file belongs only to a files entry whose pattern ends in .txt, such as metadata/en/*.txt, or that sets "format": "txt", and an entry with "format": "txt" selects only .txt files. A broad pattern such as docs/en/**/* skips .txt files, so files like LICENSE.txt or requirements.txt are not translated; a later entry that names .txt can still select them. A broad entry with "format": "txt" likewise skips images and other files beside the text. Use CLI configuration or GitHub for file selection. CLI key scope is unavailable, because line numbers are positions rather than stable keys.
Each line is translated as a separate unit, so a paragraph wrapped across several lines is translated line by line. Keep each paragraph on one line when the target language needs to reorder a sentence. Check the target where the text is used: a store listing or a field with a length limit can reject a translation that is longer than the source.