Skip to content

Commit

Permalink
Merge pull request #9 from teogor/release/1.0.0-alpha02
Browse files Browse the repository at this point in the history
Prepare for release 1.0.0-alpha02
  • Loading branch information
teogor authored Aug 28, 2024
2 parents e2a26da + e7e4bbb commit 48dddb2
Show file tree
Hide file tree
Showing 12 changed files with 443 additions and 116 deletions.
177 changes: 142 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,34 @@
## Xenoglot 🌍
# Xenoglot 🌍

### Overview

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Maven Central](https://img.shields.io/maven-central/v/dev.teogor.xenoglot/bom.svg?label=Maven%20Central)](https://central.sonatype.com/search?q=g%3Adev.teogor.xenoglot+a%3Abom&smo=true)
[![Maven Central](https://img.shields.io/maven-central/v/dev.teogor.xenoglot/xenoglot-bom.svg?label=Maven%20Central)](https://central.sonatype.com/search?q=g%3Adev.teogor.xenoglot+a%3Axenoglot-bom&smo=true)
[![Profile](https://source.teogor.dev/badges/teogor-github.svg)](https://github.com/teogor)
[![Open-Source Directory](https://source.teogor.dev/badges/teogor-dev.svg)](https://source.teogor.dev)

**Xenoglot: A Comprehensive Language Data Management Toolkit**

Xenoglot is a comprehensive library for representing, managing, and interacting with language data. It provides a rich set of classes and interfaces for representing languages, dialects, scripts, language families, and regions. The library also includes methods for obtaining language tags, checking language usage patterns, and territorializing languages. Xenoglot is essential for any project that requires accurate and consistent handling of language data.
Xenoglot is a comprehensive library for representing, managing, and interacting with language data.
It provides a rich set of classes and interfaces for representing languages, dialects, scripts,
language families, and regions. The library also includes methods for obtaining language tags,
checking language usage patterns, and territorializing languages. Xenoglot is essential for any
project that requires accurate and consistent handling of language data.

**Key Features**

* **Comprehensive Language Representation:** Xenoglot provides a structured representation of languages, dialects, scripts, language families, and regions, enabling accurate and consistent handling of language data.
* **Comprehensive Language Representation:** Xenoglot provides a structured representation of
languages, dialects, scripts, language families, and regions, enabling accurate and consistent
handling of language data.

* **Language Tag Generation:** Xenoglot provides methods for generating language tags, facilitating interoperability with language-related protocols and standards.
* **Language Tag Generation:** Xenoglot provides methods for generating language tags, facilitating
interoperability with language-related protocols and standards.

* **Language Usage Analysis:** Xenoglot includes methods for checking language usage patterns, enabling informed decisions about language selection and content localization.
* **Language Usage Analysis:** Xenoglot includes methods for checking language usage patterns,
enabling informed decisions about language selection and content localization.

* **Language Territorialization:** Xenoglot provides functionality for territorializing languages, adapting them to specific geographical or political contexts.
* **Language Territorialization:** Xenoglot provides functionality for territorializing languages,
adapting them to specific geographical or political contexts.

**Kotlin Multiplatform Support**

Expand All @@ -33,26 +43,123 @@ Xenoglot is designed to work across various platforms through Kotlin Multiplatfo
- **tvOS**: Supports tvOS devices and simulators, including `tvosX64`, `tvosArm64`, and `tvosSimulatorArm64`.
- **watchOS**: Supports watchOS devices and simulators, including `watchosX64`, `watchosArm32`, `watchosArm64`, `watchosDeviceArm64`, and `watchosSimulatorArm64`.

**Installation**
[//]: # (REGION-DEPENDENCIES)

To install Xenoglot, add the following dependency to your build script:
## Getting Started with Xenoglot

```kotlin
dependencies {
implementation(platform("dev.teogor.xenoglot:bom:1.0.0-alpha01"))
implementation("dev.teogor.xenoglot:android")
implementation("dev.teogor.xenoglot:core")

// or without bom
implementation("dev.teogor.xenoglot:core:1.0.0-alpha01")
}
```
**Adding Dependencies:**

* **Manual Setup:** This section guides you through adding Xenoglot dependencies directly to your project's `build.gradle` files. ([Link to Manual Dependency Setup Section](#adding-xenoglot-dependencies-manually))
* **Version Catalog (Recommended):** For a more streamlined approach, consider integrating a version catalog. This allows for centralized version management and easier updates. ([Link to Version Catalog Section](#managing-xenoglot-versions-with-version-catalog-recommended))

**Note:** If you prefer manual dependency setup, follow the instructions in the "Manual Setup" section. Otherwise, jump to the "Version Catalog" section for centralized management.

For information on using the KAPT plugin, see the [KAPT documentation](https://kotlinlang.org/docs/kapt.html).
For information on using the KSP plugin, see the [KSP quick-start documentation](https://kotlinlang.org/docs/ksp-quickstart.html).
For more information about dependencies, see [Add Build Dependencies](https://developer.android.com/studio/build/dependencies).

### Adding Xenoglot Dependencies Manually

To use Xenoglot in your app, add the following dependencies to your app's `build.gradle` file:

=== "Groovy"

```groovy title="build.gradle"
dependencies {
def teogorXenoglot = "1.0.0-alpha02"

implementation "dev.teogor.xenoglot:xenoglot-atlas:$teogorXenoglot"
implementation "dev.teogor.xenoglot:xenoglot-atlas-extended:$teogorXenoglot"
implementation "dev.teogor.xenoglot:xenoglot-core:$teogorXenoglot"
implementation "dev.teogor.xenoglot:xenoglot-locale:$teogorXenoglot"
implementation "dev.teogor.xenoglot:xenoglot-pluralization:$teogorXenoglot"
}
```

=== "Kotlin"

```kotlin title="build.gradle.kts"
dependencies {
val teogorXenoglot = "1.0.0-alpha02"

implementation("dev.teogor.xenoglot:xenoglot-atlas:$teogorXenoglot")
implementation("dev.teogor.xenoglot:xenoglot-atlas-extended:$teogorXenoglot")
implementation("dev.teogor.xenoglot:xenoglot-core:$teogorXenoglot")
implementation("dev.teogor.xenoglot:xenoglot-locale:$teogorXenoglot")
implementation("dev.teogor.xenoglot:xenoglot-pluralization:$teogorXenoglot")
}
```

### Managing Xenoglot Versions with Version Catalog (Recommended)

This section guides you through utilizing a version catalog for centralized management of Xenoglot dependencies in your project. This approach simplifies updates and ensures consistency.

First, define the dependencies in the `libs.versions.toml` file:

**Usage**
- **Group-Name Based:** This approach is used for declaring libraries referenced by group and artifact name.
- **Module Based:** This approach is used for declaring libraries referenced by their module.

=== "Group-Name Based"

```toml title="gradle/libs.versions.toml"
[versions]
teogor-xenoglot = "1.0.0-alpha02"

[libraries]
teogor-xenoglot-atlas = { group = "dev.teogor.xenoglot", name = "xenoglot-atlas", version.ref = "teogor-xenoglot" }
teogor-xenoglot-atlas-extended = { group = "dev.teogor.xenoglot", name = "xenoglot-atlas-extended", version.ref = "teogor-xenoglot" }
teogor-xenoglot-core = { group = "dev.teogor.xenoglot", name = "xenoglot-core", version.ref = "teogor-xenoglot" }
teogor-xenoglot-locale = { group = "dev.teogor.xenoglot", name = "xenoglot-locale", version.ref = "teogor-xenoglot" }
teogor-xenoglot-pluralization = { group = "dev.teogor.xenoglot", name = "xenoglot-pluralization", version.ref = "teogor-xenoglot" }
```

=== "Module Based"

```toml title="gradle/libs.versions.toml"
[versions]
teogor-xenoglot = "1.0.0-alpha02"

[libraries]
teogor-xenoglot-atlas = { module = "dev.teogor.xenoglot:xenoglot-atlas", version.ref = "teogor-xenoglot" }
teogor-xenoglot-atlas-extended = { module = "dev.teogor.xenoglot:xenoglot-atlas-extended", version.ref = "teogor-xenoglot" }
teogor-xenoglot-core = { module = "dev.teogor.xenoglot:xenoglot-core", version.ref = "teogor-xenoglot" }
teogor-xenoglot-locale = { module = "dev.teogor.xenoglot:xenoglot-locale", version.ref = "teogor-xenoglot" }
teogor-xenoglot-pluralization = { module = "dev.teogor.xenoglot:xenoglot-pluralization", version.ref = "teogor-xenoglot" }
```

Then, add these dependencies in your app's `build.gradle` file:

=== "Groovy"

```groovy title="build.gradle"
dependencies {
implementation libs.teogor.xenoglot.atlas
implementation libs.teogor.xenoglot.atlas.extended
implementation libs.teogor.xenoglot.core
implementation libs.teogor.xenoglot.locale
implementation libs.teogor.xenoglot.pluralization
}
```

=== "Kotlin"

```kotlin title="build.gradle.kts"
dependencies {
implementation(libs.teogor.xenoglot.atlas)
implementation(libs.teogor.xenoglot.atlas.extended)
implementation(libs.teogor.xenoglot.core)
implementation(libs.teogor.xenoglot.locale)
implementation(libs.teogor.xenoglot.pluralization)
}
```

[//]: # (REGION-DEPENDENCIES)

## Usage

The following examples demonstrate how to use Xenoglot to represent and interact with language data:

**Retrieving Language Information**
### Retrieving Language Information

```kotlin
val language = Language.English
Expand All @@ -61,36 +168,34 @@ val languageFamily = language.languageFamily
val isSpokenInRomania = language.isSpokenIn(Country.Romania)
```

**Checking Language Usage Patterns**
### Checking Language Usage Patterns

```kotlin
val isDialect = Dialect("en-US", Language.English).isDialect
val isScriptUsedInLanguage = Script.Cyrillic.isWrittenIn(Language.Russian)
```

**Territorializing Languages**
### Territorializing Languages

```kotlin
val dialect = Language.English.territorialize(Country.Australia)
val dialectLanguageTag = dialect.languageTag
val dialectCountryCode = dialect.country.code
```

**Benefits of Using Xenoglot**

* **Improved Language Handling:** Xenoglot provides a consistent and structured approach to managing language data, reducing errors and inconsistencies.
## Benefits of Using Xenoglot

* **Enhanced Interoperability:** Xenoglot facilitates interoperability with language-related protocols and standards, enabling seamless integration with external systems.
* **Improved Language Handling:** Xenoglot provides a consistent and structured approach to managing
language data, reducing errors and inconsistencies.

* **Simplified Language-Related Tasks:** Xenoglot streamlines language-related tasks, such as localization, translation, and language detection.
* **Enhanced Interoperability:** Xenoglot facilitates interoperability with language-related
protocols and standards, enabling seamless integration with external systems.

* **Promote Language-Aware Development:** Xenoglot encourages language-aware development practices, ensuring that language data is handled accurately and appropriately.
* **Simplified Language-Related Tasks:** Xenoglot streamlines language-related tasks, such as
localization, translation, and language detection.

**Getting Started**

To get started with Xenoglot, refer to the comprehensive documentation available at
[source.teogor.dev/xenoglot](https://source.teogor.dev/xenoglot). The documentation provides
detailed explanations, examples, and best practices for using the library effectively.
* **Promote Language-Aware Development:** Xenoglot encourages language-aware development practices,
ensuring that language data is handled accurately and appropriately.

## Pluralization Support

Expand Down Expand Up @@ -126,7 +231,9 @@ For a more detailed guide on how to use pluralization effectively, please refer
the [Pluralization Module Documentation](docs/pluralization-guide.md).

## Find this repository useful? 🩷
* Support it by joining __[stargazers](https://github.com/teogor/xenoglot/stargazers)__ for this repository. 📁

* Support it by joining __[stargazers](https://github.com/teogor/xenoglot/stargazers)__ for this
repository. 📁
* Get notified about my new projects by __[following me](https://github.com/teogor)__ on GitHub. 💻
* Interested in sponsoring me? [Support me](docs/sponsor.md) on GitHub! 🤝

Expand Down
9 changes: 6 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import dev.teogor.winds.api.SonatypeHost
import dev.teogor.winds.api.ArtifactIdFormat
import dev.teogor.winds.api.License
import dev.teogor.winds.api.NameFormat
import dev.teogor.winds.api.Person
import dev.teogor.winds.api.Scm
import dev.teogor.winds.api.TicketSystem
Expand Down Expand Up @@ -50,16 +51,17 @@ winds {
description = """
|\uD83C\uDF0D Xenoglot seamlessly masters languages and locales, empowering developers to integrate multilingual capabilities into their applications with ease.
""".trimMargin()
yearCreated = 2024
yearCreated = 2023
websiteUrl = "https://source.teogor.dev/xenoglot"
apiDocsUrl = "$websiteUrl/html/"

artifactDescriptor {
group = "dev.teogor.xenoglot"
name = "Xenoglot"
artifactIdFormat = ArtifactIdFormat.NAME_ONLY
artifactIdFormat = ArtifactIdFormat.MODULE_NAME_ONLY
nameFormat = NameFormat.FULL
version = createVersion(1, 0, 0) {
alphaRelease(1)
alphaRelease(2)
}
}

Expand Down Expand Up @@ -92,6 +94,7 @@ winds {
}

publishing {
enabled = false
cascade = true
enablePublicationSigning = true
optInForVanniktechPlugin = true
Expand Down
79 changes: 79 additions & 0 deletions docs/assets/winds/xenoglot-bom.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,84 @@
"date": 1700481600
}
]
},
{
"module": "dev.teogor.xenoglot:xenoglot-bom",
"version": {
"major": 1,
"minor": 0,
"patch": 0,
"flag": "Alpha",
"versionQualifier": 2
},
"date": 1724855206,
"dependencies": [
{
"module": "dev.teogor.xenoglot:xenoglot-atlas",
"version": {
"major": 1,
"minor": 0,
"patch": 0,
"flag": "Alpha",
"versionQualifier": 2
},
"date": 1724855206
},
{
"module": "dev.teogor.xenoglot:xenoglot-atlas-extended",
"version": {
"major": 1,
"minor": 0,
"patch": 0,
"flag": "Alpha",
"versionQualifier": 2
},
"date": 1724855206
},
{
"module": "dev.teogor.xenoglot:xenoglot-bom",
"version": {
"major": 1,
"minor": 0,
"patch": 0,
"flag": "Alpha",
"versionQualifier": 2
},
"date": 1724855206
},
{
"module": "dev.teogor.xenoglot:xenoglot-core",
"version": {
"major": 1,
"minor": 0,
"patch": 0,
"flag": "Alpha",
"versionQualifier": 2
},
"date": 1724855206
},
{
"module": "dev.teogor.xenoglot:xenoglot-locale",
"version": {
"major": 1,
"minor": 0,
"patch": 0,
"flag": "Alpha",
"versionQualifier": 2
},
"date": 1724855206
},
{
"module": "dev.teogor.xenoglot:xenoglot-pluralization",
"version": {
"major": 1,
"minor": 0,
"patch": 0,
"flag": "Alpha",
"versionQualifier": 2
},
"date": 1724855206
}
]
}
]
Loading

0 comments on commit 48dddb2

Please sign in to comment.