Gettext
Sublime Text syntax and support for gettext Portable Object (.po) translation files
Details
Installs
- Total 1K
- Win 397
- Mac 445
- Linux 479
| Jul 21 | Jul 20 | Jul 19 | Jul 18 | Jul 17 | Jul 16 | Jul 15 | Jul 14 | Jul 13 | Jul 12 | Jul 11 | Jul 10 | Jul 9 | Jul 8 | Jul 7 | Jul 6 | Jul 5 | Jul 4 | Jul 3 | Jul 2 | Jul 1 | Jun 30 | Jun 29 | Jun 28 | Jun 27 | Jun 26 | Jun 25 | Jun 24 | Jun 23 | Jun 22 | Jun 21 | Jun 20 | Jun 19 | Jun 18 | Jun 17 | Jun 16 | Jun 15 | Jun 14 | Jun 13 | Jun 12 | Jun 11 | Jun 10 | Jun 9 | Jun 8 | Jun 7 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 |
| Mac | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Linux | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
sublime-gettext
Sublime Text support
for gettext's Portable Object (.po) translation files.

Features
- Scopes for colors follow Sublime Text conventions
- Syntax highlighting for documentation key-values
- Mini-language for
Plural-Formats
- Mini-language for
- Goto Symbol for
msgidcontents- Even for multiline strings. See Known Issues below.
- Fold markers from
msgidthrough the end of the block - Flag-dependent placeholder formats for
- Programming languages that use
printfformatting - Programming languages with
{/}brace placeholders - Shell's
$dollar variables - Whatever you decide to add
- Programming languages that use
Installation
Package Control
- Make sure you already have Package Control installed.
- Choose Install Package from the Command Palette (Super+Shift+P).
- Type Gettext and press Enter.
With auto_upgrade enabled, Package Control will keep all installed packages up-to-date!
Using Git
- Change to your Sublime Text
Packagesdirectory. - Clone this repository.
Manual installation
- Download the latest ZIP file (./archive/master.zip).
- Unzip the archive to your Sublime Text
Packagesdirectory.
Usage
Build
Use Ctrl+B to invoke a simple .mo build system
for the currently opened .po file.
(Cmd+B on Mac)
Source reference lookup
If your cursor is on a source reference in a #: comment,
F12 will prefill it in the GoTo overlay.
Snippets
| Type | Trigger | Description |
|---|---|---|
| Block | msg |
Simple message |
| Block | msgc |
Simple message in a context |
| Block | msgp |
Plural message |
| Block | msgcp |
Plural message in a context |
| Line | hdr |
Header key-value pair |
| Line | ctx |
Message context |
| Line | id |
Message ID |
| Line | idp |
Plural message ID |
| Line | str |
Message string |
| Line | strp |
Plural message string |
Known issues
- When the
msgidcontents are long, Goto Symbol may not find phrases in the middle. - Placeholders in string content are shared between language families. The formats may not be perfect.
- The source reference lookup is a bit naive.
Credits
- Snippets: language-gettext