Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
A library and CLI for translating Python applications and libraries.
Our main design principle is "Simple things should be simple, complex things should be possible". We streamline the workflow that fits 95% of the projects and allow to configure every small detail to make it possible to fit the remaining 5%. Think about l10n as a high-level and friendly library comparing to low-level and less friendly locale, gettext, and babel.
Features:
*.po
and *.mo
files that are compatible with gettext toolchain and all other translation tools.Install l10n:
python3 -m pip install 'l10n[cli]'
And there are all the changes you need to do in your code to support translations for a string:
from l10n import Locales
locales = Locales()
def say_hello(lang='en'):
loc = locales[lang]
msg = loc.get('Hello, world!')
print(msg)
Now, let's translate it to Ukrainian:
Extract all strings from the code that need to be translated:
python3 -m l10n extract --lang uk
Translate all extracted strings using Google Translate:
python3 -m l10n translate
Compile all translations into the binary format:
python3 -m l10n compile
That's all! Now, your code supports translations:
from example import say_hello
say_hello(lang='uk')
# Привіт Світ!
If you want to manually adjust the translation text, just edit the languages/en.po
file and run compile
again. You don't even need to restart your app!
Read more in the documentation: l10n.orsinium.dev.
FAQs
A library and CLI for translating Python applications and libraries.
We found that l10n demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.