ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Gettext

by michaelblyons ALL

Sublime Text syntax and support for gettext Portable Object (.po) translation files

Details

Installs

  • Total 1K
  • Win 399
  • Mac 446
  • Linux 481
Sep 1 Aug 31 Aug 30 Aug 29 Aug 28 Aug 27 Aug 26 Aug 25 Aug 24 Aug 23 Aug 22 Aug 21 Aug 20 Aug 19 Aug 18 Aug 17 Aug 16 Aug 15 Aug 14 Aug 13 Aug 12 Aug 11 Aug 10 Aug 9 Aug 8 Aug 7 Aug 6 Aug 5 Aug 4 Aug 3 Aug 2 Aug 1 Jul 31 Jul 30 Jul 29 Jul 28 Jul 27 Jul 26 Jul 25 Jul 24 Jul 23 Jul 22 Jul 21 Jul 20 Jul 19
Windows 0 0 1 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 0 0 0 0 0 0 0 0 0 0
Mac 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 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 1 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 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

sublime-gettext

Sublime Text support for gettext's Portable Object (.po) translation files.

Screenshot demonstrating some features listed below

Features

  • Scopes for colors follow Sublime Text conventions
  • Syntax highlighting for documentation key-values
    • Mini-language for Plural-Formats
  • Goto Symbol for msgid contents
  • Fold markers from msgid through the end of the block
  • Flag-dependent placeholder formats for
    • Programming languages that use printf formatting
    • Programming languages with {/} brace placeholders
    • Shell's $ dollar variables
    • Whatever you decide to add

Installation

Package Control

  1. Make sure you already have Package Control installed.
  2. Choose Install Package from the Command Palette (Super+Shift+P).
  3. Type Gettext and press Enter.

With auto_upgrade enabled, Package Control will keep all installed packages up-to-date!

Using Git

  1. Change to your Sublime Text Packages directory.
  2. Clone this repository.

Manual installation

  1. Download the latest ZIP file (./archive/master.zip).
  2. Unzip the archive to your Sublime Text Packages directory.

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 msgid contents 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