Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
4940f490
Commit
4940f490
authored
Aug 27, 2017
by
Poommetee Ketson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ImporterCSV: print error condition to console
parent
a6e37ae2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
resource_importer_csv_translation.cpp
editor/import/resource_importer_csv_translation.cpp
+3
-6
No files found.
editor/import/resource_importer_csv_translation.cpp
View file @
4940f490
...
...
@@ -83,9 +83,7 @@ Error ResourceImporterCSVTranslation::import(const String &p_source_file, const
ERR_FAIL_COND_V
(
!
f
,
ERR_INVALID_PARAMETER
);
Vector
<
String
>
line
=
f
->
get_csv_line
();
if
(
line
.
size
()
<=
1
)
{
return
ERR_PARSE_ERROR
;
}
ERR_FAIL_COND_V
(
line
.
size
()
<=
1
,
ERR_PARSE_ERROR
);
Vector
<
String
>
locales
;
Vector
<
Ref
<
Translation
>
>
translations
;
...
...
@@ -93,9 +91,8 @@ Error ResourceImporterCSVTranslation::import(const String &p_source_file, const
for
(
int
i
=
1
;
i
<
line
.
size
();
i
++
)
{
String
locale
=
line
[
i
];
if
(
!
TranslationServer
::
is_locale_valid
(
locale
))
{
return
ERR_PARSE_ERROR
;
}
ERR_EXPLAIN
(
"Error importing CSV translation: '"
+
locale
+
"' is not a valid locale"
);
ERR_FAIL_COND_V
(
!
TranslationServer
::
is_locale_valid
(
locale
),
ERR_PARSE_ERROR
);
locales
.
push_back
(
locale
);
Ref
<
Translation
>
translation
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment