firetongue icon indicating copy to clipboard operation
firetongue copied to clipboard

Enhancement: Additional file formats for localizations

Open EliteMasterEric opened this issue 2 years ago • 1 comments

There are a variety of file formats available for storing and using translations, and Firetongue should support more of them.

This checklist is based on the list of file formats available for export from POEditor.com, an online localization platform.

  • [X] Comma-separated values (.csv)
"flag","content",
"$HELLO_WORLD","Hello, World!",
"$TEST_STRING","My mom took the elevator to the defense department.",
  • [X] Tab-separated values (.tsv)
flag	content
$HELLO_WORLD	Hello, World!
$TEST_STRING	My mom took the elevator to the defense department.
  • [ ] Android String Resources (.xml)
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="hello-world">"Hello, world!"</string>
    <string name="test-string">"My mom took the elevator to the defense department."</string>
</resources>
  • [ ] Key-Value JSON (.json)
{
    "hello-world": "Hello, world!",
    "test-string": "My mom took the elevator to the defense department."
}
  • [ ] Term JSON (.json)
[
    {
        "term": "hello-world",
        "definition": "Hello, world!",
        "context": "",
        "term_plural": "",
        "reference": "",
        "comment": ""
    },
    {
        "term": "test-string",
        "definition": "My mom took the elevator to the defense department.",
        "context": "",
        "term_plural": "",
        "reference": "",
        "comment": ""
    }
]
  • [ ] GNU gettext (.po, .pot, .mo)
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: POEditor.com\n"
"Project-Id-Version: Test2\n"
"Language: en\n"

#: 
msgid "hello-world"
msgstr "Hello, world!"

#: 
msgid "test-string"
msgstr "My mom took the elevator to the defense department."
  • [ ] YAML (.yml)
hello-world: Hello, world!
test-string: My mom took the elevator to the defense department.
  • [ ] Apple Strings (.strings)
"hello-world" = "Hello, world!";
"test-string" = "My mom took the elevator to the defense department.";
  • [ ] Microsoft Resource (.resx)
<root>
  <!-- HEADER HERE -->
  <data name="hello-world" xml:space="preserve">
    <value>Hello, world!</value>
  </data>
  <data name="test-string" xml:space="preserve">
    <value>My mom took the elevator to the defense department.</value>
  </data>
</root>

EliteMasterEric avatar Dec 31 '21 03:12 EliteMasterEric

See https://poeditor.com/help/#SupportedFormats for some common formats, although we should probably focus on the most popular ones to minimize development time.

EliteMasterEric avatar Dec 31 '21 20:12 EliteMasterEric