|
1 | | -# string_and_assets_cleaner |
| 1 | +# Android String File Localization 🌍 |
2 | 2 |
|
3 | | - |
4 | | -[](https://plugins.jetbrains.com/plugin/MARKETPLACE_ID) |
5 | | -[](https://plugins.jetbrains.com/plugin/MARKETPLACE_ID) |
| 3 | +**Android String File Localization** is a productivity-focused IntelliJ/Android Studio plugin designed to streamline the localization process. It automates the translation of `strings.xml` files while ensuring the output is sanitized and 100% compliant with Android build requirements. |
6 | 4 |
|
7 | | -## Template ToDo list |
8 | | -- [x] Create a new [IntelliJ Platform Plugin Template][template] project. |
9 | | -- [ ] Get familiar with the [template documentation][template]. |
10 | | -- [ ] Adjust the [pluginGroup](./gradle.properties) and [pluginName](./gradle.properties), as well as the [id](./src/main/resources/META-INF/plugin.xml) and [sources package](./src/main/kotlin). |
11 | | -- [ ] Adjust the plugin description in `README` (see [Tips][docs:plugin-description]) |
12 | | -- [ ] Review the [Legal Agreements](https://plugins.jetbrains.com/docs/marketplace/legal-agreements.html?from=IJPluginTemplate). |
13 | | -- [ ] [Publish a plugin manually](https://plugins.jetbrains.com/docs/intellij/publishing-plugin.html?from=IJPluginTemplate) for the first time. |
14 | | -- [ ] Set the `MARKETPLACE_ID` in the above README badges. You can obtain it once the plugin is published to JetBrains Marketplace. |
15 | | -- [ ] Set the [Plugin Signing](https://plugins.jetbrains.com/docs/intellij/plugin-signing.html?from=IJPluginTemplate) related [secrets](https://github.com/JetBrains/intellij-platform-plugin-template#environment-variables). |
16 | | -- [ ] Set the [Deployment Token](https://plugins.jetbrains.com/docs/marketplace/plugin-upload.html?from=IJPluginTemplate). |
17 | | -- [ ] Click the <kbd>Watch</kbd> button on the top of the [IntelliJ Platform Plugin Template][template] to be notified about releases containing new features and fixes. |
18 | | -- [ ] Configure the [CODECOV_TOKEN](https://docs.codecov.com/docs/quick-start) secret for automated test coverage reports on PRs |
| 5 | +## What It Is |
19 | 6 |
|
20 | | -<!-- Plugin description --> |
21 | | -This Fancy IntelliJ Platform Plugin is going to be your implementation of the brilliant ideas that you have. |
| 7 | +A lightweight but powerful IntelliJ IDEA/Android Studio plugin that identifies missing translations in your Android project and fills them using automated translation services. It handles the "heavy lifting" of creating directories, managing XML tags, and sanitizing text for Android compatibility. |
22 | 8 |
|
23 | | -This specific section is a source for the [plugin.xml](/src/main/resources/META-INF/plugin.xml) file which will be extracted by the [Gradle](/build.gradle.kts) during the build process. |
| 9 | +## ✨ Why use this? |
24 | 10 |
|
25 | | -To keep everything working, do not remove `<!-- ... -->` sections. |
26 | | -<!-- Plugin description end --> |
| 11 | +Manual translation is slow and error-prone. This plugin solves the most common headaches: |
27 | 12 |
|
28 | | -## Installation |
| 13 | +* **No more "Apostrophe" crashes:** Automatically escapes `'` to `\'` so your app actually builds. |
| 14 | +* **Invisible Character Removal:** Cleans out `NBSP` (Non-Breaking Spaces) that often hide in web-copied text and break UI layouts. |
| 15 | +* **Zero-Loss Merging:** It doesn't overwrite your work; it merges new translations into existing localized files. |
29 | 16 |
|
30 | | -- Using the IDE built-in plugin system: |
| 17 | +--- |
| 18 | + |
| 19 | +## 🛠 Features |
| 20 | + |
| 21 | +* **Smart Search:** Quickly find specific keys or English phrases in your resource files. |
| 22 | +* **Contextual Previews:** Displays original English text alongside keys for better translation context. |
| 23 | +* **Bulk Selection Logic:** * **Smart Select:** Picks only missing translations. |
| 24 | +* **Force Update:** Re-translates everything to refresh your language files. |
| 25 | + |
| 26 | + |
| 27 | +* **Translatable Guard:** Automatically respects and protects strings marked `translatable="false"`. |
| 28 | +* **Tools Menu Integration:** Accessible via `Tools > Translate Strings...` or via right-click context menus. |
31 | 29 |
|
32 | | - <kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd> > <kbd>Search for "string_and_assets_cleaner"</kbd> > |
33 | | - <kbd>Install</kbd> |
| 30 | +--- |
| 31 | + |
| 32 | +## 📖 How to Use |
| 33 | + |
| 34 | +### 1. Launching the Plugin |
34 | 35 |
|
35 | | -- Using JetBrains Marketplace: |
| 36 | +You can trigger the tool from three locations: |
36 | 37 |
|
37 | | - Go to [JetBrains Marketplace](https://plugins.jetbrains.com/plugin/MARKETPLACE_ID) and install it by clicking the <kbd>Install to ...</kbd> button in case your IDE is running. |
| 38 | +* **The Tools Menu:** `Tools` -> `Translate Strings...` |
| 39 | +* **The Project Tree:** Right-click on any `strings.xml`. |
| 40 | +* **The Editor:** Right-click inside your code and select the translation action. |
38 | 41 |
|
39 | | - You can also download the [latest release](https://plugins.jetbrains.com/plugin/MARKETPLACE_ID/versions) from JetBrains Marketplace and install it manually using |
40 | | - <kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>⚙️</kbd> > <kbd>Install plugin from disk...</kbd> |
| 42 | +### 2. Selection Strategy |
41 | 43 |
|
42 | | -- Manually: |
| 44 | +1. **Enter Language Code:** Type the ISO code (e.g., `hi` for Hindi, `es` for Spanish). |
| 45 | +2. **Filter & Select:** Use the search bar to find keys. Use **Select All** to grab missing strings. |
| 46 | +3. **Execute:** Click **OK**. Watch the progress in the bottom-right background task bar. |
| 47 | +4. **Completion:** A success balloon notification will confirm how many strings were updated. |
| 48 | + |
| 49 | +--- |
| 50 | + |
| 51 | +## 🏗 Installation |
| 52 | + |
| 53 | +### Manual Install |
| 54 | + |
| 55 | +1. Download the latest `plugin.zip` from the [Releases](https://www.google.com/search?q=https://github.com/sundramsinghdev007/Android-String-File-Localization/releases) section. |
| 56 | +2. Open Android Studio -> `Settings` -> `Plugins`. |
| 57 | +3. Click the ⚙️ (Gear Icon) -> **Install Plugin from Disk...**. |
| 58 | +4. Select the `.zip` file and restart. |
| 59 | + |
| 60 | +--- |
| 61 | + |
| 62 | +## 💻 Tech Stack |
| 63 | + |
| 64 | +* **Language:** Kotlin |
| 65 | +* **Framework:** IntelliJ Platform SDK |
| 66 | +* **Target:** Android Studio (Ladybug 2024.2.1+) |
| 67 | +* **Architecture:** MVVM-inspired UI with Background Thread (BGT) action updates. |
| 68 | + |
| 69 | +--- |
43 | 70 |
|
44 | | - Download the [latest release](https://github.com/sundramsinghdev007/string_and_assets_cleaner/releases/latest) and install it manually using |
45 | | - <kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>⚙️</kbd> > <kbd>Install plugin from disk...</kbd> |
| 71 | +## 📄 License |
46 | 72 |
|
| 73 | +This project is licensed under the **MIT License**. See the [LICENSE](/LICENSE.txt) file for more details. |
47 | 74 |
|
48 | 75 | --- |
49 | | -Plugin based on the [IntelliJ Platform Plugin Template][template]. |
50 | 76 |
|
51 | | -[template]: https://github.com/JetBrains/intellij-platform-plugin-template |
52 | | -[docs:plugin-description]: https://plugins.jetbrains.com/docs/intellij/plugin-user-experience.html#plugin-description-and-presentation |
| 77 | +Thanks to this repo [intellij-platform-plugin-template](https://github.com/JetBrains/intellij-platform-plugin-template) which helps to set-up the project. |
0 commit comments