Bugsquad edit: As of 3.2-stable, the issue is mostly a usability problem as described in https://github.com/godotengine/godot/issues/10677#issuecomment-466353021
Test project available in https://github.com/godotengine/godot/issues/10677#issuecomment-333881583
a6e37ae commit from master, Linux Mint XFCE 18.2.
1) I make simple CSV file:

2) Set test language to ru (which contains in CSV file too) and fallback lang to en in project settings.
3) Import CSV in Localization tab.
4) Make a node with label with text LANGUAGE_NAME.
5) Run this scene:

6) ?????????
7) Localization just not loaded:

You have to make sure it's the right kind of csv.. i think the doc
specifies that properly
On Aug 26, 2017 10:06 PM, "Maxim Lebedev" notifications@github.com wrote:
a6e37ae
https://github.com/godotengine/godot/commit/a6e37ae2bf57467ed2dae34756e27959f23776c0
commit from master, Linux Mint XFCE 18.2.
- I make simple CSV file:
[image: image]
https://user-images.githubusercontent.com/5412322/29746243-4c2678b8-8aed-11e7-9ae5-584936a4311e.png- Set test language to ru (which contains in CSV file too) and
fallback lang to en in project settings.- Import CSV in Localization tab.
- Make a node with label with text LANGUAGE_NAME.
- Run this scene:
[image: image]
https://user-images.githubusercontent.com/5412322/29746236-045d7194-8aed-11e7-8890-e055c15d1e91.png—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/10677, or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z22gn1PrrE39JAzypsp4G0BprQlv3ks5scMEHgaJpZM4PDqsz
.
This is right format?
id;ar;bg;zh-CN;zh-TW;cs;da;nl;en;fi;fr;de;el;hu;it;ja;ko;no;pl;pt;pt-BR;ro;ru;es;sv;th;tr;uk
LANGUAGE_NAME;العربية;български език;简体中文;繁體中文;čeština;Dansk;Nederlands;English;Suomi;Français;Deutsch;Ελληνικά;Magyar;Italiano;日本語;한국어;Norsk;Polski; Português;Português-Brasil;Română;Русский;Español;Svenska;ไทย;Türkçe;Українська
No.. must use , instead of ;
Check the demo in the demos zip
On Aug 26, 2017 10:16 PM, "Maxim Lebedev" notifications@github.com wrote:
This is right format?
id;ar;bg;zh-CN;zh-TW;cs;da;nl;en;fi;fr;de;el;hu;it;ja;ko;no;pl;pt;pt-BR;ro;ru;es;sv;th;tr;uk
LANGUAGE_NAME;العربية;български език;简体中文;繁體中文;čeština;Dansk;Nederlands;English;Suomi;Français;Deutsch;Ελληνικά;Magyar;Italiano;日本語;한국어;Norsk;Polski; Português;Português-Brasil;Română;Русский;Español;Svenska;ไทย;Türkçe;Українська—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/10677#issuecomment-325170933,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z27JmL7U_OSJrBl5F-KCFD0-jCqWMks5scMODgaJpZM4PDqsz
.
But ... Why such strictness? In CSV format, the character ; is also applicable, especially when the lines contain commas that are not delimiters between conditional cells:

(via wikipedia)
In any case, I replaced all separating characters with commas and (just in case) imported the file again - a similar error with the same result.
_ in locale names, not -.no is not a valid locale. use nn or nn_NO*.translation files, use them in Project Settings > Translation, not *.csv. (The editor should be fixed so it does this automatically IMO.)If I understand correctly, the error message is misleading because .csv has an importer but doesn't have a loader. The engine thinks it has a loader because csv.import file exists.
@Noshyaar Thanks for advise. I use language codes from steamworks documentation, where used no, not nn for Norwegian language.
I fix - symbol in language names and godot generate new translation files, that's ok.
But I still do not understand why I can not use a ; symbol as a conditional cell separator.
You can refer to core/translation.cpp for locale names.
(The official Godot docs about it is also wrong. I've just created an issue.)
Edit: PR #10688 for more delimiter options
Fixed by #10688? Or do we still need to issue/improve a warning when the locale is incorrect?
I added, at least, something that shows that import process broke in the
filesystem dock, but not sure if this is enough... maybe we should show
better error messages when an importer fails
On Thu, Aug 31, 2017 at 12:02 PM, Rémi Verschelde notifications@github.com
wrote:
Fixed by #10688 https://github.com/godotengine/godot/pull/10688? Or do
we still need to issue/improve a warning when the locale is incorrect?—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/10677#issuecomment-326323480,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z21djczbe6DMx5VWHcSer32JrydTEks5sdsr6gaJpZM4PDqsz
.
I'm sorry, I just tested with the latest build (compiled today, 3.0.r9756.66987d687-1 )...
And I get the same error launching the game:
ERROR: _load: Failed loading resource: res://i18n/turbo-argument-2.csv
my file is really simple:
id,en,fr
TITLE,Turbo argument,Turbo dispute
CLICK_ME,Click me to start,Cliquez ici pour commencer
It's encoded in UTF-8, using commas... I see the "Error" button when I add my csv file in the Localisation tab of the project setting, but I have no idea what's wrong.
I initially tried with a file containing strings with BBCode (center, didn't worked, so I simplified it with a second file... An I'm also wondering if it's possible to do line breaks in theses files with /n for example.
Is there a bug in Godot 3, or I am doing something wrong ?
I tested to import to Godot 2, and it worked... But it's not in Godot 3. I can share my files if it's useful for debugging.
Here is a minimal example for testing in Godot 3:
test-translation.zip
(Still not working for me: Linux 64bits, Antergos distrib - Arch based, same build).
Thanks for your work!
This may be an issue in the resource importer for translations, which is here:
https://github.com/godotengine/godot/blob/master/editor/import/resource_importer_csv_translation.cpp
feel free to take a look at it.
In case errors are not being shown when they should, Godot has an EditorNode::add_io_error() function to show errors that should be used.
From IRC/Discord:
<zara> I recognized that the csv.import is being generated without a path key in the [remap] tag
<zara> And it is causing a error ERR_FILE_CORRUPT on resource_import.cpp:106.
I guess the error is in this piece of code in resource_importer_csv_translarion.cpp
String ResourceImporterCSVTranslation::get_resource_type() const {
return "Translation";
}
There was a commit modifying this value from "StreamCSVTranslation" to "Translation" because there was no other reference for "StreamCSVTranslation" in the project. But there is only one loader with type "Translation", it is the TranslationLoaderPO, and it does not accept csv extension.
Good evening, @nylnook,
The "Error" button does not means that the adding translation was wrong, but it was due that Godot editor was not able to find the "Del" icon (see. #12821).
Best Regards,
William
Hi William,
Thanks for spotting and fixing that, and that was certainly part of the problem, but compiling Godot today the same error appear in the debugger when I import a .csv file:
Failed loading resource : res://translate.csv
And nothing is translated in game... I'm not able to judge or fix that, but I think @vzaramel and @mhilbrunner and on the good way ...
Best regards !
Hi @nylnook,
I was able to understand what is going on...
The engine doesn't need the csv file after it is already imported , so the translation can work without it being load properly.
The import process is not setting the reference to the translations into the project config file, I don't know whether it should or not. So after finishing the import you should set the reference to "translate.fr.translation" and "translate.en.translations" manually in "Project Settings > Localization > Translations" menu. With that the translation should work properly.
Your project.godot should have this configurations after that
translations=PoolStringArray( "res://translate.en.translation", "res://translate.fr.translation" )
@reduz,
I would propose two modifications.
First:
Not every import file has a path attribute, and when it does not i think it means that it is not a loadable resource. So we could make this distinction adding a error saying that the file is not loadable if the path is empty.But It could be a problem for other files. Another possibility is add a new attribute saying if the file should be loaded or not.
//current code
if (r_path_and_type.path == String() || r_path_and_type.type == String()) {
return ERR_FILE_CORRUPT;
}
//modified code version 1
if (r_path_and_type.path == String() || r_path_and_type.type == String()) {
return ERR_FILE_NOT_LOADABLE;
}
//modified code version 2
if (!r_path_and_type.loadable)){
return ERR_FILE_NOT_LOADABLE;
}
else if (r_path_and_type.path == String() || r_path_and_type.type == String()) {
return ERR_FILE_CORRUPT;
}
Second:
In the "Project Settings > Localization > Translations" menu when some one add a csv file, it can try to read the csv.import file and grab the references to the translation files from there.
If you agree I can submit a PR with this modifications.
Hi @vzaramel,
I can confirm importing the .translation files is a workaround and is working, thanks a lot, I didn't through about that !
Good luck with your PRs, you are certainly right !
@vzaramel are you still working on a PR for fixing this ?
Not critical for the upcoming 3.0 release, so moving to the next milestone. A fix can still be cherry-picked for 3.0.x maintenance releases once available in the master branch.
So, what should we do with this one?
Is this still reproducible in 3.1? If so, can someone provide a project that reproduces the issue?
I just tested again with Godot 3.1 beta 2 under Ubuntu 18.04 and the test project I created before in this tread. Just have to convert to a 3.1 project to open it.
when a .csv is loaded into Project Settings > Localization > Translations
the Output say
Add Translation
and when the game is started it still produce the error
E 0:00:00:0151 Failed loading resource: res://translate.csv
<C Source> core/io/resource_loader.cpp:279 @ _load()
But worse than before, the engine do not generate the .translation files, so nothing is translated !
If I load .translation files from a previous version it works, but it means the engine do not accept any new translation string...
You decide, but IMHO this should be fixed before 3.1 release, because it would mean Godot isn't able to produce any Internationalized game anymore.
Can't repro on Windows 10, latest on master.
In the project @nylnook provided, I had to add the .translation resources in the project instead of the .csv file, as described in the doc:
https://docs.godotengine.org/en/3.0/tutorials/i18n/internationalizing_games.html#configuring-the-imported-translation
I tested in 3.0 and the current master branch, and I confirm that it works fine if you add the .translation files in the Project Manager "Localization" tab.
There are two slight issues to handle though:
WARNING: _get: Property not found: locale/translationsOK, I tested again in 3.1 beta 6 and .translation files are now generated by Godot 3.1. But fixing the .cvs import so the translation work directly would be much better for users, it was working in 2.4 !
When I open the project
ERROR: _load: Failed loading resource: res://translation/eng.csv.
At: core/io/resource_loader.cpp:278.
when I run it:
ERROR: _load: Failed loading resource: res://translation/eng.csv.
At: core/io/resource_loader.cpp:278.
ERROR: get_node: Node not found: Viewport.
At: scene/main/node.cpp:1381.
ERROR: setup_local_to_scene: ViewportTexture: Path to node is invalid.
At: scene/main/viewport.cpp:68.
ERROR: _load: Failed loading resource: res://translation/eng.csv.
At: core/io/resource_loader.cpp:278.
ERROR: get_node: Node not found: Viewport.
At: scene/main/node.cpp:1381.
ERROR: setup_local_to_scene: ViewportTexture: Path to node is invalid.
At: scene/main/viewport.cpp:68.
ERROR: _load: Failed loading resource: res://translation/eng.csv.
At: core/io/resource_loader.cpp:278.
Also I have no idea if "ViewportTexture" error is related because I have no idea where it came from.
Godot 3.2beta4
Debian 10
So what's the status of this issue?
I can select .csv file in the Project Settings localization, but it doesn't work. At the very least we could remove .csv from the recognized formats and re-introducing it as mentioned in https://github.com/godotengine/godot/issues/10677#issuecomment-466636069 should go via a proposal.