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 tool to translate your desktop application to several languages.
It is just a wrapper for R18n core library. See R18n documentation for more information.
See full features in main README.
Create translations dir. For example: ./i18n/
.
Add file with translation to ./i18n/
with language code in file name
(for example, en.yml
for English or en-us.yml
USA English dialect).
For example, ./i18n/en.yml
:
file:
add: Add file
delete: Delete file %1
files: !!pl
0: No files
1: One file
n: '%1 files'
Add R18n to your application:
require 'r18n-desktop'
Load I18n object:
R18n.from_env('i18n/')
User can set the locale manually:
```ruby
R18n.from_env('i18n/', manual_locale)
```
5. Include mixin to use helpers:
```ruby
include R18n::Helpers
```
6. Use translation messages to user. For example:
```ruby
t.file.add #=> "Add file"
t.file.delete('Test') #=> "Delete file Test"
t.files(1) #=> "One file"
t.files(12) #=> "12 files"
l -12000.5 #=> "−12,000.5"
l Time.now #=> "2009-08-09 21:41"
l Time.now, :human #=> "now"
l Time.now, :full #=> "August 9th, 2009 21:41"
# Base translation
t.ok #=> "OK"
t.cancel #=> "Cancel"
```
7. You can print user locale or available locales:
```ruby
"Your locale: " + r18n.locale.title
"Select another: " + r18n.available_locales.map { |i| i.title }.join(', ')
```
R18n is licensed under the GNU Lesser General Public License version 3. You can read it in LICENSE file or in www.gnu.org/licenses/lgpl-3.0.html.
Andrey “A.I.” Sitnik andrey@sitnik.ru
FAQs
Unknown package
We found that r18n-desktop demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.