Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.
/ mofu Public archive

A tool makes I18N strings files for multiple platforms from a definition file.

License

Notifications You must be signed in to change notification settings

akr4/mofu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mofu

A tool makes I18N strings files for multiple platforms from a definition file.

Supported output formats

  • Java Properties
  • iOS/macOS Strings
  • Android Strings XML
  • JSON

Prepare Definition File

app:
  name: My App # comment
login:
  username: Username
  password: Password

Make I18N strings files

Java properties

$ mofu -i strings.yml -o strings.properties
$ cat strings.properties
app.name = My App
login.username = Username
login.password = Password

iOS/OSX localized strings

$ mofu -i strings.yml -o strings.strings
$ cat strings.strings
"login.username" = "Username";
"login.password" = "Password";
"app.name" = "My App";

Android strings

$ mofu -i strings.yml -o strings.xml
$ cat strings.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="app__name">My App</string>
    <string name="login__password">Password</string>
    <string name="login__username">Username</string>
</resources>

Advanced Usage

Filter keys

common:
  app:
    name: My App # comment
  login:
    username: Username
    password: Password

web:
  registration:
    mail_address: Mail Address

ios:
  location_usage: Accessing your location to search places around you.
$ mofu -i strings.yml -o strings.strings --includes common,ios
$ cat strings.properties
"common.app.name" = "My App";
"common.login.username" = "Username";
"common.login.password" = "Password";
"ios.location_usage" = "Accessing your location to search places around you.";
$ mofu -i strings.yml -o strings.properties --includes common,web
$ cat strings.properties
common.app.name = My App
web.registration.mail_address = Mail Address
common.login.username = Username
common.login.password = Password

About

A tool makes I18N strings files for multiple platforms from a definition file.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages