Make localizing hard-coded strings fun!

Overview

stars GitHub followers Twitter Follow

Buy Me A Coffee

Flutter Localizer IntelliJ Plugin

IntelliJ Plugin to ease the process of localizing hard coded strings in Flutter projects

showcase

Installation

The plugin is still under development and therefore not available on the IntelliJ Plugin repository. Either download flutter_localizer.zip or build the project yourself. Then follow this guide on how to install plugins from a zip file:

https://ballerina.io/learn/intellij-plugin/#installing-the-zip-file-via-the-ide

Usage

Setup

build_text

You can supply up two json file paths which will be filled with the localized values.

Next, you have to specify the code which should be generated. "$$" will be replaced by the key in camelCase

Example:

S.of(context).$$

dialog

Localization

All you have to do is hover over a string, and press Alt+Enter (invoke the quick action command).

localize

In the following dialog you have to specify the key for that given string. This should be in camel_case.

localize_dialog

Press "Ok" and you are done!


Keep in mind, this only updated the JSON file and the code to access it. If you are using a localization technique witch relies on code generation, you must run that code generator before you run the app!

Contribution

This is very early, but contributions, ideas and feedback is appreciated!

You might also like...

Food-app-flutter - A simple food ordering application with an admin panel coded with flutter and uses firebase as a backend

Food-app-flutter - A simple food ordering application with an admin panel coded with flutter and uses firebase as a backend

shop_ui A new Flutter project. Getting Started This project is a starting point

Oct 5, 2022

Now UI Flutter is a fully coded app template built for Flutter which will allow you to create powerful and beautiful e-commerce mobile applications

Now UI Flutter is a fully coded app template built for Flutter which will allow you to create powerful and beautiful e-commerce mobile applications

Now UI Flutter is a fully coded app template built for Flutter which will allow you to create powerful and beautiful e-commerce mobile applications. We have redesigned all the usual components to make it look like our Now UI Design, minimalistic and easy to use.

Oct 9, 2022

Wired Elements is a series of basic UI Elements that have a hand drawn look. These can be used for wireframes, mockups, or just the fun hand-drawn look.

Wired Elements is a series of basic UI Elements that have a hand drawn look. These can be used for wireframes, mockups, or just the fun hand-drawn look.

wired_elements Wired Elements is a series of basic UI Elements that have a hand drawn look. These can be used for wireframes, mockups, or just the fun

Dec 1, 2022

Movies4u app UI is simple enough to use and the app is a fun way to get an overview of your movie experience. This repo created with help of awesome UI, material Design and latest feature. this repo contain major feature like : dark theme.

Movies4u app UI is simple enough to use and the app is a fun way to get an overview of your movie experience. This repo created with help of awesome UI, material Design and latest feature. this repo contain major feature like : dark theme.

Moviesfree4U This is simple repository, that help in fetch latest, upcomming movies. Website https://movies4u-ef56f.firebaseapp.com/#/ https://movies4

Dec 10, 2022

Flutter UI Challenges for fun

Flutter UI Challenges for fun

flutter_fun Just small ui challenges for Fun. Glitch effect experiment IoT Humidity App Slider Design: https://dribbble.com/shots/6315218-IoT-Humidity

Dec 19, 2022

A Random Anime Quotes app I made for fun.

Random Anime Quotes An random anime quote app I made for fun. Powered by Airi Preview ranimequotes.mp4 Features ✅ Like and save locally your favorite

Aug 24, 2022

A fun Snowfall/Rainfall Project with Interactions

snowfall Snowfall Project Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this is yo

Oct 31, 2022

💙🔥 FlutterFire commons repository, makes FlutterFire app development faster, easier, and more fun!

💙🔥 FlutterFire commons repository, makes FlutterFire app development faster, easier, and more fun!

Dec 1, 2022

Wordle It's fun, simple and, like a crossword.

Wordle  It's fun, simple and, like a crossword.

Wordle It's fun, simple and, like a crossword. Getting Started Wordle gives players six chances to guess a randomly selected five-letter word. As show

Nov 28, 2022
Comments
  • Not working on Android Studio 3.5 nor 3.6

    Not working on Android Studio 3.5 nor 3.6

    When pressing Tools->"Set Up Extract String" plugin is crashing with the following stacktrace: Environment: Android Studio 3.5 and 3.6.

    java.lang.NullPointerException at com.android.tools.idea.diagnostics.AndroidStudioSystemHealthMonitor.getActionName(AndroidStudioSystemHealthMonitor.java:932) at com.android.tools.idea.diagnostics.AndroidStudioSystemHealthMonitor.countActionInvocation(AndroidStudioSystemHealthMonitor.java:821) at com.android.tools.idea.diagnostics.AndroidStudioSystemHealthMonitor$6.countActionInvocation(AndroidStudioSystemHealthMonitor.java:437) at com.intellij.ide.AndroidStudioSystemHealthMonitorAdapter.countActionInvocation(AndroidStudioSystemHealthMonitorAdapter.java:31) at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.fireBeforeActionPerformed(ActionManagerImpl.java:1196) at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$actionPerformed$0(ActionMenuItem.java:290) at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:283) at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:107) at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:282) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$0(ActionMenuItem.java:111) at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88) at com.intellij.openapi.application.TransactionGuardImpl.lambda$submitTransaction$1(TransactionGuardImpl.java:111) at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:120) at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:121) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:111) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:308) at javax.swing.AbstractButton.doClick(AbstractButton.java:376) at com.apple.laf.ScreenMenuItemCheckbox.itemStateChanged(ScreenMenuItemCheckbox.java:193) at java.awt.CheckboxMenuItem.processItemEvent(CheckboxMenuItem.java:389) at java.awt.CheckboxMenuItem.processEvent(CheckboxMenuItem.java:357) at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:357) at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:345) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:769) at java.awt.EventQueue.access$500(EventQueue.java:98) at java.awt.EventQueue$3.run(EventQueue.java:715) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84) at java.awt.EventQueue$4.run(EventQueue.java:739) at java.awt.EventQueue$4.run(EventQueue.java:737) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.awt.EventQueue.dispatchEvent(EventQueue.java:736) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:757) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:706) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:375) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

    opened by bufolab 2
  • Make it work for i18n_extension too.

    Make it work for i18n_extension too.

    To make it work for https://pub.dev/packages/i18n_extension

    In Set Up Extract String:

    $$.i18n
    

    There is no need for a key. Just keep the original string. For example Text("Home") would became Text("Home".i18n)

    Then the file should not be .arb. It should be .json. The key is the String, and leave the value empty to be filled in later:

    {
       "Home": "",
       "Welcome back!": "",
    }
    
    opened by marcglasberg 2
Owner
Norbert Kozsir
Student, Android Developer, Machine-Learning enthusiast and in love with flutter. Follow me in twitter @ norbertkozsir
Norbert Kozsir
The Health==Wealth app aims to make leading a healthy lifestyle simple, fun and rewarding for students.

The Health==Wealth app aims to make leading a healthy lifestyle simple, fun and rewarding for students. Students can also track and see their progress through the app.

null 2 Jun 25, 2022
A class for parsing strings using a sequence of patterns.

This package exposes a StringScanner type that makes it easy to parse a string using a series of Patterns. For example: import 'dart:math' as math; i

Dart 51 Nov 8, 2022
The Swift code generator for your assets, storyboards, Localizable.strings, … — Get rid of all String-based APIs!

SwiftGen SwiftGen is a tool to automatically generate Swift code for resources of your projects (like images, localised strings, etc), to make them ty

null 8.3k Dec 31, 2022
Package provides light widgets [for Linkify, Clean] and extensions for strings that contain bad words/URLs/links/emails/phone numbers

Package provides light widgets [for Linkify, Clean] and extensions for strings that contain bad words/URLs/links/emails/phone numbers

BetterX.io 4 Oct 2, 2022
Dart / Flutter package, which replaces characters in strings that are illegal/unsafe for filenames.

Dart package, which is a clone of the popular sanitize-filename npm module by Parsha Pourkhomami. Usage import 'package:sanitize_filename/sanitize_fil

e.GO Mobile 2 Jun 21, 2022
Chance Dart is a free Open Source project that lets you create random strings, integers, and other things to help with tiresome tasks, especially when building automated tests or wherever else you require anything random.

Chance Dart Random generator helper for Dart Homepage • Documentation Overview Chance Dart is a free Open Source project that lets you create random s

Ayotomide 55 Dec 27, 2022
A project created in flutter using Android Studio, coded in Dart.

Pure Match App A project created in flutter using Android Studio, coded in Dart. Currently only Android and iOS is supported, but we want to enable we

null 4 Nov 18, 2021
Speed Coded on Youtube

Installation flutter pub get Usage flutter run Live Demo : Flutter Book App Web Demo Try Android APK : Download From Google Drive Book App UI made w

Sanskar Tiwari 276 Dec 2, 2022
Todo is an Simple Task Management App coded using Dart which is a peogramming language for Flutter SDK(2.5) supports Null Safety 📑🚩

Todo ?? ?? ?? Introduction Todo is an Simple Task Management App coded using Dart which is a peogramming language for Flutter SDK(2.5) supports Null S

navee-ramesh 6 Nov 5, 2022
ui app , coded with help of codepur tut -> 30 days of flutter - this is my first app

my_shop A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this

Rajat 2 Apr 10, 2022