mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
xgettext compatibility: Output 'yes' for translatable
This commit is contained in:
parent
85630bc975
commit
f1cf70b6eb
13 changed files with 19 additions and 19 deletions
|
@ -19,7 +19,7 @@ build:
|
|||
- ninja -C _build docs/en
|
||||
- git clone https://gitlab.gnome.org/jwestman/blueprint-regression-tests.git
|
||||
- cd blueprint-regression-tests
|
||||
- git checkout 71522af3607e08143671ee0d224e65e9b9eb9f30
|
||||
- git checkout 5f9e155c1333e84e6f683cdb26b02a5925fd8db3
|
||||
- ./test.sh
|
||||
- cd ..
|
||||
coverage: '/TOTAL.*\s([.\d]+)%/'
|
||||
|
|
|
@ -150,7 +150,7 @@ class XmlOutput(OutputFormat):
|
|||
elif isinstance(translated, QuotedLiteral):
|
||||
return {}
|
||||
else:
|
||||
return {"translatable": "true", "context": translated.translate_context}
|
||||
return {"translatable": "yes", "context": translated.translate_context}
|
||||
|
||||
def _emit_signal(self, signal: Signal, xml: XmlEmitter):
|
||||
name = signal.name
|
||||
|
|
|
@ -8,7 +8,7 @@ corresponding .blp file and regenerate this file with blueprint-compiler.
|
|||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkBox">
|
||||
<accessibility>
|
||||
<property name="label" translatable="true">Hello, world!</property>
|
||||
<property name="label" translatable="yes">Hello, world!</property>
|
||||
<relation name="labelled-by">my_label</relation>
|
||||
<state name="checked">1</state>
|
||||
</accessibility>
|
||||
|
|
|
@ -9,17 +9,17 @@ corresponding .blp file and regenerate this file with blueprint-compiler.
|
|||
<object class="GtkDialog">
|
||||
<child type="action">
|
||||
<object class="GtkButton" id="cancel_button">
|
||||
<property name="label" translatable="true">Cancel</property>
|
||||
<property name="label" translatable="yes">Cancel</property>
|
||||
</object>
|
||||
</child>
|
||||
<child type="action">
|
||||
<object class="GtkButton" id="custom_response_button">
|
||||
<property name="label" translatable="true">Reinstall Windows</property>
|
||||
<property name="label" translatable="yes">Reinstall Windows</property>
|
||||
</object>
|
||||
</child>
|
||||
<child type="action">
|
||||
<object class="GtkButton" id="ok_button">
|
||||
<property name="label" translatable="true">Ok</property>
|
||||
<property name="label" translatable="yes">Ok</property>
|
||||
</object>
|
||||
</child>
|
||||
<action-widgets>
|
||||
|
@ -31,7 +31,7 @@ corresponding .blp file and regenerate this file with blueprint-compiler.
|
|||
<object class="GtkInfoBar">
|
||||
<child type="action">
|
||||
<object class="GtkButton" id="ok_info_button">
|
||||
<property name="label" translatable="true">Ok</property>
|
||||
<property name="label" translatable="yes">Ok</property>
|
||||
</object>
|
||||
</child>
|
||||
<action-widgets>
|
||||
|
|
|
@ -8,8 +8,8 @@ corresponding .blp file and regenerate this file with blueprint-compiler.
|
|||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="AdwAlertDialog">
|
||||
<responses>
|
||||
<response id="cancel" translatable="true">Cancel</response>
|
||||
<response id="discard" translatable="true" appearance="destructive">Discard</response>
|
||||
<response id="cancel" translatable="yes">Cancel</response>
|
||||
<response id="discard" translatable="yes" appearance="destructive">Discard</response>
|
||||
<response id="save" enabled="false" appearance="suggested">Save</response>
|
||||
</responses>
|
||||
</object>
|
||||
|
|
|
@ -9,7 +9,7 @@ corresponding .blp file and regenerate this file with blueprint-compiler.
|
|||
<object class="GtkLabel" id="label"></object>
|
||||
<object class="AdwBreakpoint">
|
||||
<condition>max-width: 600px</condition>
|
||||
<setter object="label" property="label" translatable="true">Hello, world!</setter>
|
||||
<setter object="label" property="label" translatable="yes">Hello, world!</setter>
|
||||
<setter object="label" property="visible">false</setter>
|
||||
<setter object="label" property="extra-menu"></setter>
|
||||
</object>
|
||||
|
|
|
@ -8,8 +8,8 @@ corresponding .blp file and regenerate this file with blueprint-compiler.
|
|||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="AdwMessageDialog">
|
||||
<responses>
|
||||
<response id="cancel" translatable="true">Cancel</response>
|
||||
<response id="discard" translatable="true" appearance="destructive">Discard</response>
|
||||
<response id="cancel" translatable="yes">Cancel</response>
|
||||
<response id="discard" translatable="yes" appearance="destructive">Discard</response>
|
||||
<response id="save" enabled="false" appearance="suggested">Save</response>
|
||||
</responses>
|
||||
</object>
|
||||
|
|
|
@ -9,7 +9,7 @@ corresponding .blp file and regenerate this file with blueprint-compiler.
|
|||
<object class="GtkComboBoxText">
|
||||
<items>
|
||||
<item>Hello, world!</item>
|
||||
<item translatable="true">Hello!</item>
|
||||
<item translatable="yes">Hello!</item>
|
||||
<item id="item_id">item</item>
|
||||
</items>
|
||||
</object>
|
||||
|
|
|
@ -8,7 +8,7 @@ corresponding .blp file and regenerate this file with blueprint-compiler.
|
|||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GObject"></object>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="true">Test</property>
|
||||
<property name="label" translatable="yes">Test</property>
|
||||
<property name="visible">false</property>
|
||||
</object>
|
||||
</interface>
|
||||
|
|
|
@ -12,7 +12,7 @@ corresponding .blp file and regenerate this file with blueprint-compiler.
|
|||
<attribute name="label">test section</attribute>
|
||||
</section>
|
||||
<item>
|
||||
<attribute name="label" translatable="true" context="context">test translated item</attribute>
|
||||
<attribute name="label" translatable="yes" context="context">test translated item</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label">test item shorthand 1</attribute>
|
||||
|
|
|
@ -9,7 +9,7 @@ corresponding .blp file and regenerate this file with blueprint-compiler.
|
|||
<object class="GtkScale">
|
||||
<marks>
|
||||
<mark value="-1" position="bottom"></mark>
|
||||
<mark value="0" position="top" translatable="true">Hello, world!</mark>
|
||||
<mark value="0" position="top" translatable="yes">Hello, world!</mark>
|
||||
<mark value="2"></mark>
|
||||
</marks>
|
||||
</object>
|
||||
|
|
|
@ -9,7 +9,7 @@ corresponding .blp file and regenerate this file with blueprint-compiler.
|
|||
<object class="GtkStringList" id="greetings">
|
||||
<items>
|
||||
<item>Hello, world!</item>
|
||||
<item translatable="true">Hello!</item>
|
||||
<item translatable="yes">Hello!</item>
|
||||
</items>
|
||||
</object>
|
||||
<object class="GtkDropDown">
|
||||
|
|
|
@ -7,9 +7,9 @@ corresponding .blp file and regenerate this file with blueprint-compiler.
|
|||
<interface>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="true">Hello, world!</property>
|
||||
<property name="label" translatable="yes">Hello, world!</property>
|
||||
</object>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="true" context="translation context">Hello</property>
|
||||
<property name="label" translatable="yes" context="translation context">Hello</property>
|
||||
</object>
|
||||
</interface>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue