English | 简体中文
Table of Contents
[2.1.1] - 2024-08-01
API
Fixed
[2.1.0] - 2023-10-12
Command Line Tool
Added
[2.0.0] - 2023-06-07
Command Line Tool
Changed
Added
Fixed
API
Changed
Added
Documentation
Changed
Added
Fixed
[1.3.2] - 2022-09-24
Command Line Tool
Fixed
[1.3.1] - 2022-09-21
Command Line Tool
Fixed
[1.3.0] - 2022-09-13
Command Line Tool
Changed
Added
Fixed
API
Added
[1.2.1] - 2022-07-07
Command Line Tool
Fixed
[1.2.0] - 2022-07-05
Command Line Tool
Changed
Added
Fixed
API
Added
Fixed
Documentation
Added
[1.1.1] - 2022-06-25
Documentation
Fixed
[1.1.0] - 2022-06-25
Command Line Tool
Changed
Added
Fixed
Removed
Documentation
Added
[1.0.0] - 2022-06-13
Command Line Tool
Added
API
Added
- Fix the issue where
Interpolation Variable
are incorrectly parsed when there are spaces in keywords of thePlural
type
// Similar to the following
t('there have {p0 Country or Region} in the list', 100)
- The command line configuration adds
input
config, which supports filtering files usingglob
syntax #4
- Set the command line language defaults to English
- Adjust the command line to initialize the default configuration template
- After the execution of the new translation, the output content of the console is displayed on the number of different log types
- Added the following support of the following translation platform
- Google x
- OpenAI
- Microsoft
- Alibaba Cloud
- Tencent
- Youdao
- Add
-P
|--path
parameter to initialization command and translation command to support flexible specification of configuration file path
- Fix when the difference between
Language code
andlocale
, identify the error of the translated language package, and eventually lead to repeated translation - Fix as the following scene extraction
Translation Text
abnormal
// Can't extract 'b'
const text = t('a', t('b'))
- Adjust the API naming
- Follow the naming rules of the small hump
setI18N
→setI18n
withI18N
→withI18n
- More concise
i18n
→t
- Follow the naming rules of the small hump
- Adjust
setI18n
usagesetI18n
Function can only modifylocale
andlangs
dynamically. The other attributes are first called and defined byinitI18n
- Increase the return parameters, and will return all the configuration status in the current name space
- Added support for namespaces
- New
initI18n
function is used to obtain the original coret
,setI18n
,withI18n
function - New
namespace
attribute is used to support naming space - The format callback of
Variable Interpolation
addt
parameter
- New
- Updated the format of the
Changelog
documentation, distinguishing the contents updated independently inCommand Line Tool
,API
, andDocumentation
- Added English documents and set it to the default language documentation
- Fixed the navigation error caused by generating the same anchor point in the
Changelog
documentation
- Fix unexpected generation of similar to
xxx.jso
folder after executing translation command in Windows system #2
- Fix initialization command reporting an exception in Windows system #1
translate-error.json
is changed from Translation failed to translation error type, and Translation failed is identified bytranslate-fail.json
- Added a new log output type: the list of incorrectly translated text
- Fix
baiduConfig.delay
does not take effect when multiple languages are switched
- Add
withI18N
function API to support server scenarios - Add
Interpolation Variable
type tag and type formatting callback function- Supports numeric, currency, date, time, plural, and other types of
Interpolation Variable
tags setI18N
addedformatNumber
,formatCurrency
,formatDate
,formatTime
,formatPlural
and other attributes
- Supports numeric, currency, date, time, plural, and other types of
- Fix execute command error:
Error: Cannot find module 'md5-node'
- Optimize the command line not input command only input parameter
-L
|--locale
can also display the corresponding language prompts- npx i18n -L zh
- npx i18n --locale zh
- Optimize the translation failure output log
translate-error.json
given specific cause failure - Adjust the maximum number of characters requested for batch translation of Baidu-Translation interface to
3000
- Add time consuming statistics output of translation command execution
- Added a new translation log type
filepaths.json
: the list of file paths that are matched - Add
incremental translation
mode- This mode is enabled by default and can be closed through the command parameter
--non-incremental
- Supports translating only the text that has not been translated in the target language
- Supports intelligently removing the translated text that has not been used in the language package
- This mode is enabled by default and can be closed through the command parameter
- Add
output.indentSize
configuration attribute to specify the number of indented spaces in the output file - Add
baiduConfig.delay
configuration attribute to set the delay time of Baidu-Translation - Newly added rules constraints:
Translation Text
cannot include special characters\t
- Fix
Translation Text
contains\t
special characters lead to abnormal translation
- Add the
beginIndex
function parameter attributesetI18N
to specify the starting index ofInterpolation Variable
- Fix
setI18N
setting a single attribute will cause other attribute states to be lost
- Added documentation for Translation Log
- Fix the problem that the picture does not appear in the document
- Configuration item
filterFile
has been deprecated and replaced byfileRegExp
- The new
output.langType
configuration item supports generating language pack in different formats - Add
from
,to
,codeLocaleMap
Baidu-Translation configuration items - New
funcName
configuration item supports user-defined matching function name
- Fixed the formatting error in the translation log file
translate-success.json
when the text contains.
- Remove
got
,walk
,chalk
,lodash
and other dependencies
- Add
README
description document
- Add the basic implementation of
Command Line Tool
- Add command line parameters for language switching
- New
i18n
andsetI18N
function API