MobileStringsToolkit


Source link: https://github.com/ezaquarii/MobileStringsToolkit

About

Mobile String Toolkit is a handy Python 3 script that helps managing translation texts for mobile applications.

Normally we put our app translations directly to proper resource files. This is however very challenging when working with non-technical... clients.

Non-technical people are familiar with Excel or Google Docs, but rarely with any decent development tools. This creates endless trails of e-mails with requests for updates or fixes and copy-n-paste sessions that are cumbersome and boring.

I found that providing a simple interface, where a client can update application resources easily, is a huge win four me. No more lost e-mails - I can build my complete set of resources from CSV file of Google Spreadsheet delivered by the client.

MST is just for that - it will take CSV or google spreadsheet and generate XML files with translations.

Features:

  • generate Android string resources
  • loading data from CSV or Google Docs
  • support normal strings, string arrays or quantity strings
  • easily extendable with new output formats (plans for iOS) or data loaders

Installation

Currently there is no installation "bundle". Unpack MST somewhere and run:

python3 /path/to/MST/generate.py

You must be running Python 3 to use this script.

Usage

After "installation" the script is ready to use. Type

python3 /path/to/mst/generate.py --help

to obtain usage instructions.

To generate proper resources we must create a configuration file in project root. This file contains information about generator (ie. output format) and list of files we want to write our translations to. Parameter sorted tells if output strings should be sorted by key alphabetically. This should mitigate large commits when somebody sorts spreadsheet. Configuration file is in JSON format:

{
  "generator": "android",  "sorted": true  "paths": {

"en": "res/values/strings.xml",
"de": "res/values-de/strings.xml", 
}

Examples:

In both examples we expect /project/mst.cfg configuration files to be properly written.

  1. Generate resources in /project using CSV files. Print operation status.
python3 generate.py --project-root /project -C /project/strings.csv --verbose
  1. Generate resources in /project using Google Docs. Print operation status.
python3 generate.py --project-root /project -G [email protected] password spreadsheet worksheet --verbose

If running this script becomes cumbersome, I advice you to set a launcher in your IDE. For Eclipse go to External Tools Configuration and you're set. Enjoy!

Limitations

So far there was no extensive testing by the masses, so if you find any bugs - please report them or fix them and send me patches. This script worked for me for some time, buy you may find more corner cases.

Wondering why you can't put your google credentials directly into a configuration file? This is a design decision. Configuration file will probably become part of your repository contents and I don't want to be responsible for anybody uploading his username/password to public GitHub repository. :)

This is a feature and I don't plan to change it.

Resources

This lightweight library provides visual alerts to developers and QA when an issue happens during development / testing phase.

In traditional android development, when an issue occurs, we use logs to dump the unexpected state or exception trace. Printing to logcat is not enough at times as:

  • Logs can be overlooked by developers if we are not constantly monitoring.
  • Logs maybe on a remote device which is inaccessible.

Using this library, you can provide visual warning to the developer / QA when something goes wrong on your test or internal builds so that critical issues can be highlighted as and when they happen.

Easily add four tabbed bottom navigation bar in your app.

This library aids in adding four tabs in Bottom Navigation Bar, as easily and fast as possible. Th result looks like as it is commonly found in most of the apps, like Quora and others.

Point to note: This library is significantly different from what Google has provided for Android Developers. The official Bottom Navigation Bar from Google doesn't show text when it has 4 tabs. But this library shows icon and text with four bottom bars.

A simple library for Android to get images from gallery or from camera.

Application for saving photos/videos from Instagram.

Last images added or downloaded to the device. Like the functionality of Facebook, Instagram and Whatsapp.

RxJava2 and Kotlin for Firebase.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes