summaryrefslogtreecommitdiffstats
path: root/gettext-tools/doc/gettext.texi
diff options
context:
space:
mode:
authorAndreas Stricker <astricker@futurelab.ch>2010-02-23 14:14:09 +0100
committerDaiki Ueno <ueno@gnu.org>2013-04-17 17:51:07 +0900
commitfe8db3b5b44cd23385e3dfccf54249b742d8d994 (patch)
tree127c653c910e4893b2061c0c1c2d7bae73a1d32b /gettext-tools/doc/gettext.texi
parent97c6a779339a0de698606eaa42c347bcd027bfea (diff)
downloadexternal_gettext-fe8db3b5b44cd23385e3dfccf54249b742d8d994.zip
external_gettext-fe8db3b5b44cd23385e3dfccf54249b742d8d994.tar.gz
external_gettext-fe8db3b5b44cd23385e3dfccf54249b742d8d994.tar.bz2
Support for JavaScript.
Diffstat (limited to 'gettext-tools/doc/gettext.texi')
-rw-r--r--gettext-tools/doc/gettext.texi83
1 files changed, 81 insertions, 2 deletions
diff --git a/gettext-tools/doc/gettext.texi b/gettext-tools/doc/gettext.texi
index f479ed8..e09632c 100644
--- a/gettext-tools/doc/gettext.texi
+++ b/gettext-tools/doc/gettext.texi
@@ -410,6 +410,7 @@ The Translator's View
* kde-format:: KDE Format Strings
* boost-format:: Boost Format Strings
* lua-format:: Lua Format Strings
+* javascript-format:: JavaScript Format Strings
Individual Programming Languages
@@ -435,6 +436,7 @@ Individual Programming Languages
* Pike:: Pike
* GCC-source:: GNU Compiler Collection sources
* Lua:: Lua
+* JavaScript:: JavaScript
sh - Shell Script
@@ -1631,6 +1633,12 @@ Likewise for Boost, see @ref{boost-format}.
@kwindex no-lua-format@r{ flag}
Likewise for Lua, see @ref{lua-format}.
+@item javascript-format
+@kwindex javascript-format@r{ flag}
+@itemx no-javascript-format
+@kwindex no-javascript-format@r{ flag}
+Likewise for JavaScript, see @ref{javascript-format}.
+
@end table
@kwindex msgctxt
@@ -8974,6 +8982,7 @@ strings.
* kde-format:: KDE Format Strings
* boost-format:: Boost Format Strings
* lua-format:: Lua Format Strings
+* javascript-format:: JavaScript Format Strings
@end menu
@node c-format, objc-format, Translators for other Languages, Translators for other Languages
@@ -9230,12 +9239,27 @@ such as @samp{%1$+5d}, or may be surrounded by vertical bars, such as
@samp{%|1$+5d|} or @samp{%|1$+5|}, or consists of just an argument number
between percent signs, such as @samp{%1%}.
-@node lua-format, , boost-format, Translators for other Languages
+@node lua-format, javascript-format, boost-format, Translators for other Languages
@subsection Lua Format Strings
Lua format strings are described in the Lua reference manual, section @w{String Manipulation},
@uref{http://www.lua.org/manual/5.1/manual.html#pdf-string.format}.
+@node javascript-format, , lua-format, Translators for other Languages
+@subsection JavaScript Format Strings
+
+Although JavaScript specification itself does not define any format
+strings, many JavaScript implementations provide printf-like
+functions. @code{xgettext} understands a set of common format strings
+used in popular JavaScript implementations including Gjs, Seed, and
+Node.JS. In such a format string, a directive starts with @samp{%}
+and is finished by a specifier: @samp{%} denotes a literal percent
+sign, @samp{c} denotes a character, @samp{s} denotes a string,
+@samp{b}, @samp{d}, @samp{o}, @samp{x}, @samp{X} denote an integer,
+@samp{f} denotes floating-point number, @samp{j} denotes a JSON
+object.
+
+
@node Maintainers for other Languages, List of Programming Languages, Translators for other Languages, Programming Languages
@section The Maintainer's View
@@ -9340,6 +9364,7 @@ that language, and to combine the resulting files using @code{msgcat}.
* Pike:: Pike
* GCC-source:: GNU Compiler Collection sources
* Lua:: Lua
+* JavaScript:: JavaScript
@end menu
@node C, sh, List of Programming Languages, List of Programming Languages
@@ -11800,7 +11825,7 @@ Uses autoconf macros
yes
@end table
-@node Lua, , GCC-source, List of Programming Languages
+@node Lua, JavaScript, GCC-source, List of Programming Languages
@subsection Lua
@table @asis
@@ -11862,6 +11887,60 @@ On platforms without gettext, the functions are not available.
---
@end table
+@node JavaScript
+@subsection JavaScript
+
+@table @asis
+@item RPMs
+js
+
+@item File extension
+@code{js}
+
+@item String syntax
+@itemize @bullet
+
+@item @code{"abc"}
+
+@item @code{'abc'}
+
+@end itemize
+
+@item gettext shorthand
+@code{_("abc")}
+
+@item gettext/ngettext functions
+@code{gettext}, @code{dgettext}, @code{dcgettext}, @code{ngettext},
+@code{dngettext}
+
+@item textdomain
+@code{textdomain} function
+
+@item bindtextdomain
+@code{bindtextdomain} function
+
+@item setlocale
+automatic
+
+@item Prerequisite
+---
+
+@item Use or emulate GNU gettext
+use, or emulate
+
+@item Extractor
+@code{xgettext}
+
+@item Formatting with positions
+---
+
+@item Portability
+On platforms without gettext, the functions are not available.
+
+@item po-mode marking
+---
+@end table
+
@c This is the template for new languages.
@ignore