mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-06 16:19:07 -04:00
Compare commits
1 commit
baf9602b03
...
b98fc44790
Author | SHA1 | Date | |
---|---|---|---|
|
b98fc44790 |
4 changed files with 0 additions and 21 deletions
|
@ -58,19 +58,6 @@ class Translated(AstNode):
|
|||
f"Cannot convert translated string to {expected_type.full_name}"
|
||||
)
|
||||
|
||||
@validate("context")
|
||||
def context_double_quoted(self):
|
||||
if self.translate_context is None:
|
||||
return
|
||||
|
||||
if not str(self.group.tokens["context"]).startswith('"'):
|
||||
raise CompileWarning("gettext may not recognize single-quoted strings")
|
||||
|
||||
@validate("string")
|
||||
def string_double_quoted(self):
|
||||
if not str(self.group.tokens["string"]).startswith('"'):
|
||||
raise CompileWarning("gettext may not recognize single-quoted strings")
|
||||
|
||||
@docs()
|
||||
def ref_docs(self):
|
||||
return get_docs_section("Syntax Translated")
|
||||
|
|
|
@ -24,8 +24,6 @@ If you're using Meson's `i18n module <https://mesonbuild.com/i18n-module.html#i1
|
|||
|
||||
i18n.gettext('package name', preset: 'glib')
|
||||
|
||||
You must use double quotes for the translated strings in order for gettext to recognize them. Newer versions of blueprint will warn you if you use single quotes.
|
||||
|
||||
Contexts
|
||||
--------
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
Label {
|
||||
label: _('Hello, World!');
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
4,12,15,gettext may not recognize single-quoted strings
|
Loading…
Add table
Add a link
Reference in a new issue