Issue Importing Text from .po Files

Greetings,

I am attempting to import two .po files into the Localization Dashboard.
The directory structure is as follows:

Strings/
        en/Game.po
        ja/Game.po

Strings/en/Game.po

# Game English translation.
# Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#
msgid ""
msgstr ""
"Project-Id-Version: Game\n"
"POT-Creation-Date: 2019-08-23 07:02\n"
"PO-Revision-Date: 2019-08-23 07:02\n"
"Language-Team: \n"
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"

msgid "test"
msgstr "Test"

msgid "test2"
msgstr "Test2"

Strings/ja/Game.po

# Game Japanese translation.
# Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#
msgid ""
msgstr ""
"Project-Id-Version: Game\n"
"POT-Creation-Date: 2019-08-23 07:02\n"
"PO-Revision-Date: 2019-08-23 07:02\n"
"Language-Team: \n"
"Language: ja\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"

msgid "test"
msgstr "テスト"

msgid "test2"
msgstr "テスト2"

However, after selecting Import Text in the Localization Dashboard and selecting the Strings directory, I get a false positive that the text was imported (green check) and the word count for both cultures remains at 0.

Questions:

Does the Import Text feature require the word count to be greater than 0 prior to importing? I.e., an existing string table (.uasset) must also exist with the same text as the PO files.

If not, what step(s) am I missing to be able to import?

It appears one does in fact need to have gathered words prior to importing the PO file.

The work flow is as follows:

  1. Gather Text from Blueprints, etc.
  2. Ensure the msgid matches what is gathered from Blueprints, etc.
  3. Import Text from PO Files

An example for note 2: A button would need to have the test in Content->Text in order for テスト to be translated properly.

Apologies for opening a question.

You can’t just import arbitrary text, as the import process will only accept text previously found by a gather (aka, text that exists in its manifest).

If you want to add arbitrary text for use in a project, then a String Table might be a decent idea, however you’d still have to run a gather and use the files exported to drive your translation process.

Alternatively you could add a custom text source to let you add arbitrary text directly to our live-table from whatever format you wanted.

All of that is covered in the docs: Localizing Content in Unreal Engine | Unreal Engine 5.1 Documentation

I was mistaken about the Import Text feature. I thought it would import text directly (gathering the text) from the PO files.

It’s clear now, thank you.