mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Compare commits
5 commits
b7eff54655
...
b4bdb721cd
Author | SHA1 | Date | |
---|---|---|---|
|
b4bdb721cd | ||
|
404ae76787 | ||
|
04ef0944db | ||
|
aa13c8f5af | ||
|
c683254761 |
9 changed files with 57 additions and 5 deletions
|
@ -8,7 +8,7 @@ in the NEWS file.
|
||||||
3. Make a new commit with just these two changes. Use `Release v{version}` as the commit message. Tag the commit as `v{version}` and push the tag.
|
3. Make a new commit with just these two changes. Use `Release v{version}` as the commit message. Tag the commit as `v{version}` and push the tag.
|
||||||
4. Create a "Post-release version bump" commit.
|
4. Create a "Post-release version bump" commit.
|
||||||
5. Go to the Releases page in GitLab and create a new release from the tag.
|
5. Go to the Releases page in GitLab and create a new release from the tag.
|
||||||
6. Announce the release through relevant channels (Twitter, TWIG, etc.)
|
6. Announce the release through relevant channels (Mastodon, TWIG, etc.)
|
||||||
|
|
||||||
## Related projects
|
## Related projects
|
||||||
|
|
||||||
|
|
32
NEWS.md
32
NEWS.md
|
@ -1,3 +1,35 @@
|
||||||
|
# v0.16.0
|
||||||
|
|
||||||
|
## Added
|
||||||
|
- Added more "go to reference" implementations in the language server
|
||||||
|
- Added semantic token support for flag members in the language server
|
||||||
|
- Added property documentation to the hover tooltip for notify signals
|
||||||
|
- The language server now shows relevant sections of the reference documentation when hovering over keywords and symbols
|
||||||
|
- Added `not-swapped` flag to signal handlers, which may be needed for signal handlers that specify an object
|
||||||
|
- Added expression literals, which allow you to specify a Gtk.Expression property (as opposed to the existing expression support, which is for property bindings)
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
- The formatter adds trailing commas to lists (Alexey Yerin)
|
||||||
|
- The formatter removes trailing whitespace from comments (Alexey Yerin)
|
||||||
|
- Autocompleting a commonly translated property automatically adds the `_("")` syntax
|
||||||
|
- Marking a single-quoted string as translatable now generates a warning, since gettext does not recognize it when using the configuration recommended in the blueprint documentation
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
- Added support for libgirepository-2.0 so that blueprint doesn't crash due to import conflicts on newer versions of PyGObject (Jordan Petridis)
|
||||||
|
- Fixed a bug when decompiling/porting files with enum values
|
||||||
|
- Fixed several issues where tests would fail with versions of GTK that added new deprecations
|
||||||
|
- Addressed a problem with the language server protocol in some editors (Luoyayu)
|
||||||
|
- Fixed an issue where the compiler would crash instead of reporting compiler errors
|
||||||
|
- Fixed a crash in the language server that occurred when a detailed signal (e.g. `notify::*`) was not complete
|
||||||
|
- The language server now properly implements the shutdown command, fixing support for some editors and improving robustness when restarting (Alexey Yerin)
|
||||||
|
- Marking a string in an array as translatable now generates an error, since it doesn't work
|
||||||
|
-
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
- Added mention of `null` in the Literal Values section
|
||||||
|
- Add apps to Built with Blueprint section (Benedek Dévényi, Vladimir Vaskov)
|
||||||
|
- Corrected and updated many parts of the documentation
|
||||||
|
|
||||||
# v0.14.0
|
# v0.14.0
|
||||||
|
|
||||||
## Added
|
## Added
|
||||||
|
|
|
@ -58,6 +58,19 @@ class Translated(AstNode):
|
||||||
f"Cannot convert translated string to {expected_type.full_name}"
|
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()
|
@docs()
|
||||||
def ref_docs(self):
|
def ref_docs(self):
|
||||||
return get_docs_section("Syntax Translated")
|
return get_docs_section("Syntax Translated")
|
||||||
|
|
|
@ -39,8 +39,7 @@ LIBDIR = None
|
||||||
class BlueprintApp:
|
class BlueprintApp:
|
||||||
def main(self):
|
def main(self):
|
||||||
self.parser = argparse.ArgumentParser()
|
self.parser = argparse.ArgumentParser()
|
||||||
self.subparsers = self.parser.add_subparsers(metavar="command")
|
self.subparsers = self.parser.add_subparsers(metavar="command", required=True)
|
||||||
self.parser.set_defaults(func=self.cmd_help)
|
|
||||||
|
|
||||||
compile = self.add_subcommand(
|
compile = self.add_subcommand(
|
||||||
"compile", "Compile blueprint files", self.cmd_compile
|
"compile", "Compile blueprint files", self.cmd_compile
|
||||||
|
|
|
@ -17,7 +17,7 @@ a module in your flatpak manifest:
|
||||||
{
|
{
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://gitlab.gnome.org/jwestman/blueprint-compiler",
|
"url": "https://gitlab.gnome.org/jwestman/blueprint-compiler",
|
||||||
"tag": "v0.14.0"
|
"tag": "v0.16.0"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,8 @@ If you're using Meson's `i18n module <https://mesonbuild.com/i18n-module.html#i1
|
||||||
|
|
||||||
i18n.gettext('package name', preset: 'glib')
|
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
|
Contexts
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
project('blueprint-compiler',
|
project('blueprint-compiler',
|
||||||
version: '0.14.0',
|
version: '0.16.0',
|
||||||
)
|
)
|
||||||
|
|
||||||
prefix = get_option('prefix')
|
prefix = get_option('prefix')
|
||||||
|
|
5
tests/sample_errors/single_quoted_translated.blp
Normal file
5
tests/sample_errors/single_quoted_translated.blp
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
using Gtk 4.0;
|
||||||
|
|
||||||
|
Label {
|
||||||
|
label: _('Hello, World!');
|
||||||
|
}
|
1
tests/sample_errors/single_quoted_translated.err
Normal file
1
tests/sample_errors/single_quoted_translated.err
Normal file
|
@ -0,0 +1 @@
|
||||||
|
4,12,15,gettext may not recognize single-quoted strings
|
Loading…
Add table
Add a link
Reference in a new issue