Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
This twine plugin provide a formatter for .arb
files, used by Flutter projects.
To generate a localizations .arb
file use twine generate-localization-file
command.
Example:
twine generate-localization-file twine.txt app_en.arb
Input twine file:
[[Section A]]
[key1]
en = Text with comment for translators
comment = comment key1
[key2]
en = Simple text
Output arb file:
{
"@@locale": "en",
"key1": "Text with comment for translators",
"@key1": {
"description": "comment key1"
},
"key2": "Simple text"
}
To consume a twin localizations file to an .arb
file use twine consume-localization-file
command.
If you want to consume comments add -c
option to the twine command.
Example:
twine consume-localization-file twine.txt app_en.arb -c
Input arb file:
{
"@@locale": "en",
"key1": "Text with comment for translators",
"@key1": {
"description": "comment key1"
},
"key2": "Simple text"
}
Output twine file:
[[Uncategorized]]
[key1]
en = Text with comment for translators
comment = comment key1
[key2]
en = Simple text
Warning! The arb file doesn't contain any reference to sections so all the keys are added to the "Uncategorized" section, when the -a
option of consume-localization-file
is used.
Flutter provides extended support to placeholders in the localization files.
Currently this plugin support a basic use of placeholders automatically creating an untyped placeholder for every string wrapped with curlty braces.
Are only supported placeholders with lowercase chars, uppercase chars, digits, .
, _
and -
.
Example:
Input twine file:
[[Section B]]
[key3]
en = Text with {name} placeholder
[key4]
en = Text with double placeholders {1} and {2} and a comment
comment = comment key4
[[Section C]]
[key5]
en = Placeholders with punctuation: {p_1}, {p-1}, {p.1}
Output arb file:
{
"@@locale": "en",
"key3": "Text with {name} placeholder",
"@key3": {
"placeholders": {
"name": {}
}
},
"key4": "Text with double placeholders {1} and {2} and a comment",
"@key4": {
"description": "comment key4",
"placeholders": {
"1": {},
"2": {}
}
},
"key5": "Placeholders with punctuation: {p_1}, {p-1}, {p.1}",
"@key5": {
"placeholders": {
"p_1": {},
"p-1": {},
"p.1": {}
}
}
}
Install this gem:
gem install twine-flutter
Then setup twine to use this plugin as described here adding the following in a twine configuration file.
gems: twine-flutter
FAQs
Unknown package
We found that twine-flutter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.