Movatterモバイル変換


[0]ホーム

URL:


locales

package
v1.3.1Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2025 License:GPL-3.0Imports:7Imported by:0

Details

Repository

github.com/arduino/arduino-cli

Links

README

I18N

Usage

In the source code, use the functioni18n.Tr("message", ...args) to get a localized string. This tool parses thesource using thego/ast package to generate theen locale using these messages.

Updating messages to reflect code changes

The following command updates the locales present in the source code to reflect addition/removal of messages.

task i18n:update

Syncing the catalog with transifex

Environment variables

Set the following environment variables according to the project

VariableDescription
TRANSIFEX_PROJECTName of the transifex project
TRANSIFEX_RESOURCEName of the transifex translation resource
TRANSIFEX_API_KEYAPI Key to access the transifex project
Push
task i18n:push
Pull
task i18n:pull

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcFromJavaToGoSyntax

func FromJavaToGoSyntax(sstring)string

FromJavaToGoSyntax convert a translation string made for Java to a one suitable for golang (printf-style).The conversion transforms java placeholders like "{0}","{1}","{2}",etc... with the equivalent for golang"%[1]v","%[2]v","%[3]v",etc...A pair of adjacent single-quote characters "'" (U+0027) is replaced with one only.

funcInit

func Init(configLocalestring)

Init initializes the i18n module, setting the locale according to this order of preference:1. Locale specified via the function call2. OS Locale3. en (default)

Types

This section is empty.

Source Files

View all Source files

Directories

PathSynopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp