t3ll

command module
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2020 License: MIT Imports: 8 Imported by: 0

README

TYPO3 Local Lang

This is a small utility program to edit localization files in Xlif or the legacy format for TYPO3 CMS.

Installation

t3ll opens its editor inside a Google Chrome or Chromium window. One of this must be available on your system.

There are no installer or package manager files, but installation is still easy:

Binary downloads

Go to the releases page and download the right file for your system. Rename it to t3ll / t3ll.exe and put it into $PATH / %PATH%.

All binaries can be checked via gpg. The .sig files contain signatures created with the key 0D1F16703AB055AA. It is available on most common keyservers or on https://grossberger-ge.org/gpg.asc

Example:

# Import key
gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 0D1F16703AB055AA

VERSION=$(curl -sSL 'https://api.github.com/repos/garfieldius/t3ll/releases/latest' | jq -r '.tag_name')
ARCH=linux_x64

# Download binary and signature
curl -sSLo t3ll https://github.com/garfieldius/t3ll/releases/download/${VERSION}/t3ll_${ARCH}
curl -sSLo t3ll.sig https://github.com/garfieldius/t3ll/releases/download/${VERSION}/t3ll_${ARCH}.sig

# Verify
gpg --verify t3ll.sig t3ll

# Install
install -m 0755 t3ll /usr/local/bin/
Building from source

t3ll is written in go and uses node.js and yarn modules for building its frontend, so these tools need to be installed and properly configured before proceeding.

Then simply clone the repository:

# Manually

mkdir -p ${GOPATH}/src/github.com/garfieldius
cd ${GOPATH}/src/github.com/garfieldius
git clone https://github.com/garfieldius/t3ll.git
cd t3ll


# or using go get, the -d flag is important because
# building will fail without the frontend assets
# which are not included in the repository but must
# be built before compiling t3ll

go get -d github.com/garfieldius/t3ll
cd ${GOPATH}/src/github.com/garfieldius/t3ll

... and use make to build it:

# This will create a production binary in the current directory
make

# Build a debug binary. Has the same functions but VERY verbose logging to stdout
make debug

# Install the binary into /usr/local/bin
make install

Usage

t3ll is called from the command line. It takes exactly one argument: the XML or Xliff file to edit.

t3ll fr.locallang.xlf

# Legacy XML
t3ll locallang.xml

In the former case, the file can have a language prefix, or not. t3ll will automatically load all available translations within the same folder, but only those having the same base name. eg.: loading the file fr.locallang.xlf will also load locallang.xlf and it.locallang.xlf, but not fr.locallang_be.xlf.

If a file does not exist, it will be created.

Once the file is read, the editing mask will open in a chromium or google chrome window. It's interface should be self explanatory as it is very simple and reduced to the absolute minimum.

There are several shortcuts in the browser window:

  • Tab will focus the first input, jumping to the next if one is already focused. If the last input is active, the first will be focused again.
  • Cmd / Ctrl / Alt + s will save the file
  • Alt + ← / ↑ / ↓ / → will move the focus accordingly if an input is selected.
  • Alt + Backspace / Del will delete a row if an input or textarea is focused
  • Alt + + will add a bew row below the current if an input or textarea is focused

When converting from XML to XLIF, the old .xml file will not be deleted, this must be done manually.

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package browser offers a type to open a chromium or google chrome browser window in app-mode with the given URL as entrypoint
Package browser offers a type to open a chromium or google chrome browser window in app-mode with the given URL as entrypoint
Package labels offes types and functions to load and save XLIFF v1 and TYPO3 locallang XML files
Package labels offes types and functions to load and save XLIFF v1 and TYPO3 locallang XML files
Package log is a convenience wrapper around go's log and fmt packages It is not, by intention, a sophisticated logging package
Package log is a convenience wrapper around go's log and fmt packages It is not, by intention, a sophisticated logging package

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL