Kotlin script to prevent invalid conversion errors in projects with many localization files

Overview

Localization-Patterns-Checker

Kotlin script to prevent invalid conversion errors in the projects with many localization files or with large amount of supported languages.

Script setup

  1. Put the local_pattern_checker-1.0.0.jar file wherever it is possible to access the project files.
  2. Create conf.txt file with the following values:
    • PATH: path to files.
    • BASE: base pattern or char to identify if the string contains placeholder.
    • PATTERN: placeholder pattern.
    • REGEX-CONFLICT: characters from REGEX syntax, that are contained in the placeholders.
    • FOLDER-FILTER: only files, with parent directory, that contains this value, will be checked.
    • FILE-FILTER: only files, with names contains this value, will be checked.
  3. Run the local_pattern_checker-1.0.0.jar file (be sure, that you've placed conf.txt file in the same directory).
  4. If there were some errors, check errors.txt file.
  5. Check result.txt file, to see the Localization-Patterns-Checker script results.

Useful info

Project can be very unstable:

Now it was only tested with %s and %1$s placeholders, but successfully passed the RTL languages check.

Example of the conf.txt file:

PATH: ./app/src/main/
PATTERN: %s
PATTERN: %1$s
REGEX-CONFLICT: $
BASE: %
FOLDER-FILTER: values
FILE-FILTER: string

There is ready-to-use jar file in the project's root folder.

You might also like...
Create libraries for all types of Kotlin projects: android, JVM, Multiplatform, Gradle plugins, and so on.

JavierSC Kotlin template Create libraries for all types of Kotlin projects: android, JVM, Multiplatform, Gradle plugins, and so on. Features Easy to p

A lightweight tool for managing and building Kotlin projects.

kpm kpm (Kotlin Project Manager) is a lightweight tool for managing and building Kotlin projects. What is kpm? Essentially, kpm is going to be a light

Library to generalize functionality between several projects
Library to generalize functionality between several projects

libreforge libreforge is a library to generalize functionality between several projects, notably EcoArmor, EcoWeapons, and Reforges. Get from JitPack:

Launch Spring projects by github url
Launch Spring projects by github url

Ktor application made for quickly demonstrating Spring projects on our Java lessons. Spring launcher: Starts a fresh Postgres container Builds the pro

Android application for tracking accumulative time of projects.

TimeTracker Track the time you've put into hobby projects, studying or work. Features: Data stored in local SQL database Built with Google MVVM archit

Maintenance mode library for spring boot web and security projects.

spring-boot-starter-maintenance spring-boot-starter-maintenance is a maintenance mode library for spring boot web and security projects. Download Grad

Base projects for Devpass' Dev Sprints

Foundations Backend Challenge In this challenge, we're going to develop features for a Backend application where we'll apply backend development funda

Base projects for Devpass' Dev Sprints

CI Challenge - Android ✅ Learn to create and configure Continuous Integration (CI) environments. Develop CI pipelines and integrations with tools like

These files are included in an Android Studio Project for a Magic the Gathering Life Counter app. The app was written in Kotlin.
These files are included in an Android Studio Project for a Magic the Gathering Life Counter app. The app was written in Kotlin.

Magic-Life-Counter These files were created in Android Studio using Kotlin. Usage This app was made to keep track of life totals while playing the tra

Owner
Бырна Алексей
Бырна Алексей
Simple Kotlin localization library.

Simple Kotlin localization library.

Vadim Yaroschuk 7 Nov 8, 2022
Server & Web App of Tolgee localization toolkit

Server & Web App of Tolgee localization toolkit

Tolgee 534 Jan 8, 2023
LocalisationDemo - A sample project to demonstrate localization in android

LocalisationDemo This is a sample project to demonstrate localization in android

shubham423 0 Jan 8, 2022
Distance Sensor Localization Library created by FTC 16439, AlphaGo

AGDistanceLocalization A simple and easy-to-use library, written in Kotlin, to aid in the process of localizing your robot using Distance Sensors! Thi

AlphaGo 3 Nov 3, 2022
This library handles conversion between Request Params and JPA Specification.

Spring Jpa Magic Filter This library handles conversion between spring rest Request Params and JPA Specification. It can be considered a simpler alter

Verissimo Joao Ribeiro 4 Jan 12, 2022
Convenient kotlin script runner

KScript Convenient kotlin script running engine for JVM. Examples Base class: open class Test(val test: String) KScript("println(test)").apply {

null 16 Nov 8, 2022
OpenAbyss - Open source script for Powbot that crafts runes through the abyss

OpenAbyss Open source script for Powbot that crafts runes through the abyss Feat

null 3 Feb 9, 2022
FlowExt is a Kotlin Multiplatform library, that provides many operators and extensions to Kotlin Coroutines Flow

FlowExt | Kotlinx Coroutines Flow Extensions | Kotlinx Coroutines Flow Extensions. Extensions to the Kotlin Flow library | kotlin-flow-extensions | Coroutines Flow Extensions | Kotlin Flow extensions | kotlin flow extensions | Flow extensions

Petrus Nguyễn Thái Học 151 Jan 1, 2023
Open-Source Forge 1.8.9 Hypixel Duels bot! Planned to support many modes and written in Kotlin.

This project has been moved to a new repository: [HumanDuck23/duck-dueller-v2](https://github.com/HumanDuck23/duck-dueller-v2) Duck Dueller Are you ti

null 2 Aug 29, 2022
This Kotlin Multiplatform library is for accessing the TMDB API to get movie and TV show content. Using for Android, iOS, and JS projects.

Website | Forum | Documentation | TMDb 3 API Get movie and TV show content from TMDb in a fast and simple way. TMDb API This library gives access to T

Moviebase 37 Dec 29, 2022