Cockpit playground

## HTML translations

For translating HTML use these forms:

`<span translate>Ready</span>` = Ready

`<span translate translate-context="verb">Ready</span>` = Ready

`<span translate="yes">Not Ready</span>` = Not Ready

`<span translate="title" title="Unavailable">Cancel</span>` = Cancel

`<span translate="yes title" title="Unavailable">Cancel</span>` = Cancel

Note that we do not support:

- Interpolation of variables.
- Pluralization
- The `<translate>` element

## Old Glade style

The old Glade style is not recommended:

`<span translatable="yes">Empty</span>` = Empty

`<span translatable="yes" context="verb">Empty</span>` = Empty

Note that we do not support:

- Interpolation of variables.
- Tranlatable attributes.
- Pluralization
- The `<translate>` element

## Mustache translations

For translating Mustache use these forms:

Note that we do not support:

- Interpolation of variables.
- Pluralization
- The `<translate>` element

## Code Translations

For translating in javascript code, use these forms:

`_("Empty")` =

`_("verb", "Empty")` =

`C_("verb", "Empty")` =

`cockpit.gettext("Control")` =

`cockpit.gettext("key", "Control")` =

`cockpit.ngettext("$0 disk is missing", "$0 disks are missing", 1)` =

`cockpit.ngettext("$0 disk is missing", "$0 disks are missing", 2)` =

`cockpit.ngettext("disk-non-rotational", "$0 disk is missing", "$0 disks are missing", 1)` =

`cockpit.ngettext("disk-non-rotational", "$0 disk is missing", "$0 disks are missing", 2)` =

Note that we do not support:

- Extraction of single quoted strings.

## Angular Translations

In Angular use these forms:

`<span translate>Ready</span>` = Ready

`<span translate translate-context="verb">Ready</span>` = Ready

`<span translate>Delete '{{ name }}'</span>` = Delete '{{ name }}'

When translating Angular we not support:

- The `translatable` attribute.
- The `translate="attr"` translating of attribute values.
- The `{{value|translate}}` filter, even though documented on angular-gettext.
- The `<translate>` element