Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 21 additions & 38 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,38 +1,21 @@
LUMINIA DEVELOPMENT CLOSED SOURCE LICENSE (LD-CSL)
Version 1.0 — 2025

Copyright © 2025 Luminia Development and its members
Website: https://luminiadev.com
GitHub: https://github.com/luminiaDev/

1. License Grant
This software, including but not limited to its source code, binaries, documentation, and any related materials (hereinafter referred to as the "Software"), is proprietary and confidential to Luminia Development and its members. Unless explicitly stated otherwise in a written agreement signed by Luminia Development, no rights are granted to use, copy, modify, distribute, or otherwise exploit the Software in any form.

2. Restrictions
Without prior written permission from Luminia Development, the following actions are strictly prohibited:
- Distribution, publication, sublicensing, or otherwise making the Software available to any third parties.
- Use of the Software, whether in part or in whole, for any commercial purposes.
- Reverse engineering, decompilation, disassembly, or any other attempt to derive the source code of the Software if delivered in binary form.
- Execution, deployment, or running of the Software in any environment not explicitly authorized by Luminia Development.

These restrictions apply equally to both the source code and compiled binaries of the Software.

3. Permission and Revocation
Written permission for specific use of the Software may be granted by Luminia Development. Any such permission may be revoked by Luminia Development at any time, without notice and without the need to provide justification. Upon revocation, all rights previously granted shall immediately terminate, and any continued use of the Software will constitute a violation of this License.

4. Ownership
All intellectual property rights in and to the Software remain the exclusive property of Luminia Development and its members. Nothing in this License shall be interpreted as a transfer of ownership or as granting any implied rights not expressly stated herein.

5. No Warranty
The Software is provided "AS IS" and without any warranty of any kind, whether express or implied. This includes but is not limited to implied warranties of merchantability, fitness for a particular purpose, or non-infringement. Luminia Development makes no guarantee that the Software will function without error, interruption, or defects.

6. Limitation of Liability
In no event shall Luminia Development or its members be held liable for any damages, including but not limited to direct, indirect, incidental, or consequential damages, arising out of the use, misuse, or inability to use the Software, even if advised of the possibility of such damages.

7. Governing Law and Jurisdiction
This License shall be governed by and construed in accordance with the laws of the Russian Federation. Any disputes, claims, or legal proceedings arising out of or related to this License shall fall under the exclusive jurisdiction of the Arbitration Court of the city of Vladivostok. By using the Software, you agree to submit to the personal and exclusive jurisdiction of this court for the resolution of any disputes.

8. Copyright Protection
Any infringement of intellectual property rights relating to the Software shall be prosecuted in accordance with applicable law. Luminia Development actively enforces its rights and will submit formal notices of violation, including but not limited to Digital Millennium Copyright Act (DMCA) takedown requests, to hosting providers, code repositories, or other third parties in order to remove unauthorized content and prevent further violations.

End of License
MIT License

Copyright (c) 2026 Densy Development

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
65 changes: 55 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ Polyglot is an advanced and multifunctional library for localizing strings.

## Example of usage
```java
import com.luminiadev.polyglot.api.Translation;
import com.luminiadev.polyglot.api.context.TranslationContext;
import com.luminiadev.polyglot.api.util.FallbackStrategy;
import com.luminiadev.polyglot.api.util.LanguageStrategy;
import com.luminiadev.polyglot.common.language.SimpleLanguage;
import com.luminiadev.polyglot.core.context.BaseTranslationContext;
import com.luminiadev.polyglot.core.language.SimpleLanguageStandard;
import com.luminiadev.polyglot.core.provider.YamlFileProvider;
import org.densy.polyglot.api.Translation;
import org.densy.polyglot.api.context.TranslationContext;
import org.densy.polyglot.api.util.LanguageStrategy;
import org.densy.polyglot.common.language.SimpleLanguage;
import org.densy.polyglot.core.context.BaseTranslationContext;
import org.densy.polyglot.core.language.SimpleLanguageStandard;
import org.densy.polyglot.core.parameter.KeyedTrParameters;
import org.densy.polyglot.core.provider.YamlFileProvider;

import java.io.File;

Expand Down Expand Up @@ -52,5 +52,50 @@ System.out.println("Translated local message: " + local);
System.out.println("Translated global message: " + global);
```

## Dependency info on Luminia Dev Repo:
https://repo.luminiadev.com/#/private/com/luminiadev/polyglot
## Maven
Adding repository:
```xml
<repositories>
<repository>
<id>densy-repository-snapshots</id>
<url>https://repo.densy.org/snapshots</url>
</repository>
</repositories>
```

Adding a library api:
```xml
<dependency>
<groupId>org.densy.polyglot</groupId>
<artifactId>api</artifactId>
<version>1.0.5-SNAPSHOT</version>
</dependency>
```

Adding a library implementation:
```xml
<dependency>
<groupId>org.densy.polyglot</groupId>
<artifactId>core</artifactId>
<version>1.0.5-SNAPSHOT</version>
</dependency>
```

## Gradle
Adding repository:
```groovy
maven {
name = "densyRepositorySnapshots"
url = uri("https://repo.densy.org/snapshots")
}
```

Adding a library api:
```groovy
implementation "org.densy.polyglot:api:1.0.5-SNAPSHOT"
```

Adding a library implementation:
```groovy
implementation "org.densy.polyglot:core:1.0.5-SNAPSHOT"
```
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.luminiadev.polyglot.api;
package org.densy.polyglot.api;

import com.luminiadev.polyglot.api.language.Language;
import com.luminiadev.polyglot.api.parameter.TrParameters;
import com.luminiadev.polyglot.api.parameter.formatter.TrParameterFormatter;
import com.luminiadev.polyglot.api.util.FallbackStrategy;
import com.luminiadev.polyglot.api.util.LanguageStrategy;
import org.densy.polyglot.api.language.Language;
import org.densy.polyglot.api.parameter.TrParameters;
import org.densy.polyglot.api.parameter.formatter.TrParameterFormatter;
import org.densy.polyglot.api.util.FallbackStrategy;
import org.densy.polyglot.api.util.LanguageStrategy;

import java.util.Set;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.luminiadev.polyglot.api.context;
package org.densy.polyglot.api.context;

import com.luminiadev.polyglot.api.Translation;
import com.luminiadev.polyglot.api.language.Language;
import com.luminiadev.polyglot.api.language.LanguageStandard;
import com.luminiadev.polyglot.api.provider.TranslationProvider;
import org.densy.polyglot.api.Translation;
import org.densy.polyglot.api.language.Language;
import org.densy.polyglot.api.language.LanguageStandard;
import org.densy.polyglot.api.provider.TranslationProvider;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.luminiadev.polyglot.api.language;
package org.densy.polyglot.api.language;

/**
* Represents a language.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.luminiadev.polyglot.api.language;
package org.densy.polyglot.api.language;

/**
* Language localization standard interface. Defines how language strings are parsed and formatted.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.luminiadev.polyglot.api.language.converter;
package org.densy.polyglot.api.language.converter;

import com.luminiadev.polyglot.api.language.Language;
import org.densy.polyglot.api.language.Language;

/**
* Interface for converting between two language formats.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.luminiadev.polyglot.api.parameter;
package org.densy.polyglot.api.parameter;

import com.luminiadev.polyglot.api.parameter.formatter.TrParameterFormatter;
import org.densy.polyglot.api.parameter.formatter.TrParameterFormatter;

/**
* Base interface for translation parameters.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.luminiadev.polyglot.api.parameter.formatter;
package org.densy.polyglot.api.parameter.formatter;

import com.luminiadev.polyglot.api.parameter.TrParameters;
import org.densy.polyglot.api.parameter.TrParameters;

/**
* Parameter formatter interface.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.luminiadev.polyglot.api.provider;
package org.densy.polyglot.api.provider;

import com.luminiadev.polyglot.api.language.Language;
import org.densy.polyglot.api.language.Language;

import java.util.Map;
import java.util.Set;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.luminiadev.polyglot.api.util;
package org.densy.polyglot.api.util;

/**
* Fallback strategy interface. Defines how to resolve missing keys.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.luminiadev.polyglot.api.util;
package org.densy.polyglot.api.util;

import com.luminiadev.polyglot.api.language.Language;
import org.densy.polyglot.api.language.Language;

import java.util.HashMap;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.luminiadev.polyglot.api.util;
package org.densy.polyglot.api.util;

import com.luminiadev.polyglot.api.language.Language;
import org.densy.polyglot.api.language.Language;

import java.util.Map;

Expand Down
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ java {
}

allprojects {
group = "com.luminiadev.polyglot"
group = "org.densy.polyglot"
version = "1.0.5-SNAPSHOT"
}

Expand Down Expand Up @@ -41,8 +41,8 @@ subprojects {
}
repositories {
maven {
name = "luminiadev"
url = uri("https://repo.luminiadev.com/private")
name = "densy"
url = uri("https://repo.densy.org/snapshots")
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.luminiadev.polyglot.common.language;
package org.densy.polyglot.common.language;

import com.luminiadev.polyglot.core.language.BaseLanguage;
import org.densy.polyglot.core.language.BaseLanguage;

/**
* Built-in languages in standard locale format.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.luminiadev.polyglot.common.language;
package org.densy.polyglot.common.language;

import com.luminiadev.polyglot.core.language.BaseLanguage;
import org.densy.polyglot.core.language.BaseLanguage;

/**
* Built-in languages in a simple format.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.luminiadev.polyglot.common.language.converter;
package org.densy.polyglot.common.language.converter;

import com.luminiadev.polyglot.api.language.Language;
import com.luminiadev.polyglot.api.language.converter.LanguageConverter;
import org.densy.polyglot.api.language.Language;
import org.densy.polyglot.api.language.converter.LanguageConverter;

import java.util.HashMap;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.luminiadev.polyglot.common.language.converter;
package org.densy.polyglot.common.language.converter;

import com.luminiadev.polyglot.common.language.LocaleLanguage;
import com.luminiadev.polyglot.common.language.SimpleLanguage;
import org.densy.polyglot.common.language.LocaleLanguage;
import org.densy.polyglot.common.language.SimpleLanguage;

/**
* Converter between SimpleLanguage and LocaleLanguage.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package com.luminiadev.polyglot.core;

import com.luminiadev.polyglot.api.util.FallbackStrategy;
import com.luminiadev.polyglot.api.Translation;
import com.luminiadev.polyglot.api.context.TranslationContext;
import com.luminiadev.polyglot.api.language.Language;
import com.luminiadev.polyglot.api.parameter.TrParameters;
import com.luminiadev.polyglot.api.parameter.formatter.TrParameterFormatter;
import com.luminiadev.polyglot.api.provider.TranslationProvider;
import com.luminiadev.polyglot.api.util.LanguageStrategy;
import com.luminiadev.polyglot.core.parameter.KeyedTrParameters;
import com.luminiadev.polyglot.core.parameter.SimpleTrParameters;
import com.luminiadev.polyglot.core.parameter.formatter.BraceKeyedParameterFormatter;
import com.luminiadev.polyglot.core.parameter.formatter.BracketSimpleParameterFormatter;
package org.densy.polyglot.core;

import org.densy.polyglot.api.util.FallbackStrategy;
import org.densy.polyglot.api.Translation;
import org.densy.polyglot.api.context.TranslationContext;
import org.densy.polyglot.api.language.Language;
import org.densy.polyglot.api.parameter.TrParameters;
import org.densy.polyglot.api.parameter.formatter.TrParameterFormatter;
import org.densy.polyglot.api.provider.TranslationProvider;
import org.densy.polyglot.api.util.LanguageStrategy;
import org.densy.polyglot.core.parameter.KeyedTrParameters;
import org.densy.polyglot.core.parameter.SimpleTrParameters;
import org.densy.polyglot.core.parameter.formatter.BraceKeyedParameterFormatter;
import org.densy.polyglot.core.parameter.formatter.BracketSimpleParameterFormatter;

import java.util.HashMap;
import java.util.HashSet;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.luminiadev.polyglot.core.context;

import com.luminiadev.polyglot.api.Translation;
import com.luminiadev.polyglot.api.context.TranslationContext;
import com.luminiadev.polyglot.api.language.Language;
import com.luminiadev.polyglot.api.language.LanguageStandard;
import com.luminiadev.polyglot.api.provider.TranslationProvider;
import com.luminiadev.polyglot.core.BaseTranslation;
import com.luminiadev.polyglot.core.language.SimpleLanguageStandard;
import com.luminiadev.polyglot.core.parameter.KeyedTrParameters;
import com.luminiadev.polyglot.core.provider.EmptyProvider;
package org.densy.polyglot.core.context;

import org.densy.polyglot.api.Translation;
import org.densy.polyglot.api.context.TranslationContext;
import org.densy.polyglot.api.language.Language;
import org.densy.polyglot.api.language.LanguageStandard;
import org.densy.polyglot.api.provider.TranslationProvider;
import org.densy.polyglot.core.BaseTranslation;
import org.densy.polyglot.core.language.SimpleLanguageStandard;
import org.densy.polyglot.core.parameter.KeyedTrParameters;
import org.densy.polyglot.core.provider.EmptyProvider;

import java.util.HashMap;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.luminiadev.polyglot.core.language;
package org.densy.polyglot.core.language;

import com.luminiadev.polyglot.api.language.Language;
import org.densy.polyglot.api.language.Language;
import lombok.EqualsAndHashCode;
import lombok.ToString;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.luminiadev.polyglot.core.language;
package org.densy.polyglot.core.language;

import com.luminiadev.polyglot.api.language.Language;
import com.luminiadev.polyglot.api.language.LanguageStandard;
import org.densy.polyglot.api.language.Language;
import org.densy.polyglot.api.language.LanguageStandard;

import java.util.regex.Matcher;
import java.util.regex.Pattern;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.luminiadev.polyglot.core.language;
package org.densy.polyglot.core.language;

import com.luminiadev.polyglot.api.language.Language;
import com.luminiadev.polyglot.api.language.LanguageStandard;
import org.densy.polyglot.api.language.Language;
import org.densy.polyglot.api.language.LanguageStandard;

import java.util.regex.Pattern;

Expand Down
Loading