summaryrefslogtreecommitdiff
path: root/editor/pot_generator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/pot_generator.cpp')
-rw-r--r--editor/pot_generator.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/editor/pot_generator.cpp b/editor/pot_generator.cpp
index 9b3227ad28..2d65c00a89 100644
--- a/editor/pot_generator.cpp
+++ b/editor/pot_generator.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -135,7 +135,7 @@ void POTGenerator::_write_to_pot(const String &p_file) {
}
// Write context.
- if (!context.empty()) {
+ if (!context.is_empty()) {
file->store_line("msgctxt \"" + context + "\"");
}
@@ -143,7 +143,7 @@ void POTGenerator::_write_to_pot(const String &p_file) {
_write_msgid(file, msgid, false);
// Write msgid_plural
- if (!plural.empty()) {
+ if (!plural.is_empty()) {
_write_msgid(file, plural, true);
file->store_line("msgstr[0] \"\"");
file->store_line("msgstr[1] \"\"\n");
@@ -185,7 +185,7 @@ void POTGenerator::_add_new_msgid(const String &p_msgid, const String &p_context
Vector<MsgidData> &v_mdata = all_translation_strings[p_msgid];
for (int i = 0; i < v_mdata.size(); i++) {
if (v_mdata[i].ctx == p_context) {
- if (!v_mdata[i].plural.empty() && !p_plural.empty() && v_mdata[i].plural != p_plural) {
+ if (!v_mdata[i].plural.is_empty() && !p_plural.is_empty() && v_mdata[i].plural != p_plural) {
WARN_PRINT("Redefinition of plural message (msgid_plural), under the same message (msgid) and context (msgctxt)");
}
v_mdata.write[i].locations.insert(p_location);