Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Short names #318

Closed
wants to merge 1 commit into from
Closed
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
6 changes: 3 additions & 3 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
# List of components with at least two owners as specified in docs/crate-ownership.

components/locale/ @zbraniecki @nciric
components/pluralrules @zbraniecki @sffc
components/data-provider/ @sffc
components/data-provider-json/ @sffc
components/plurals/ @zbraniecki @sffc
components/data_provider/ @sffc
components/data_provider_json/ @sffc
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[workspace]

members = [
"components/cldr-json-data-provider",
"components/data-provider",
"components/fs-data-provider",
"components/cldr_json_data_provider",
"components/data_provider",
"components/fs_data_provider",
"components/icu",
"components/icu4x",
"components/uniset",
"components/locale",
"components/locale/macros",
"components/pluralrules",
"components/plurals",
"components/datetime",
"resources/testdata",
"utils/fixed-decimal",
"utils/fixed_decimal",
]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "icu-cldr-json-data-provider"
name = "icu_cldr_json_data_provider"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. "icu_data_cldr"?

description = "Data provider that reads from a CLDR JSON data source"
version = "0.0.1"
authors = ["The ICU4X Project Developers"]
Expand All @@ -15,9 +15,9 @@ include = [
]

[dependencies]
icu-data-provider = { path = "../data-provider" }
icu-locale = { path = "../locale" }
icu-pluralrules = { path = "../pluralrules" }
icu_data_provider = { path = "../data_provider" }
icu_locale = { path = "../locale" }
icu_plurals = { path = "../plurals" }
json = "0.12"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! `icu-cldr-json-data-provider` is one of the [`ICU4X`] components.
//! `icu_cldr_json_data_provider` is one of the [`ICU4X`] components.
//!
//! It contains implementations of the [`DataProvider`] interface based on the JSON files
//! shipped by CLDR. You create a CldrPaths and then pass it into CldrJsonDataProvider.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::CldrPaths;
use icu_data_provider::iter::DataEntryCollection;
use icu_data_provider::prelude::*;
use icu_data_provider::structs::plurals::*;
use icu_pluralrules::rules::{parse, serialize};
use icu_plurals::rules::{parse, serialize};
use std::borrow::Cow;
use std::convert::TryFrom;
use std::marker::PhantomData;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "icu-data-provider"
name = "icu_data_provider"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just "icu_data", and then the class is called DataProvider?

description = "Trait and struct definitions for the ICU data provider"
version = "0.0.1"
authors = ["The ICU4X Project Developers"]
Expand All @@ -19,7 +19,7 @@ include = [
invariant = []

[dependencies]
icu-locale = { path = "../locale" }
icu_locale = { path = "../locale" }
tinystr = "0.3"
erased-serde = "0.3"
smallstr = { version = "0.2", features = ["serde"] }
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! `icu-data-provider` is one of the [`ICU4X`] components.
//! `icu_data_provider` is one of the [`ICU4X`] components.
//!
//! It defines traits and structs for transmitting data through the ICU4X locale data pipeline.
//! The primary trait is [`DataProvider`]. It has one method, which transforms a [`Request`] into
Expand Down
10 changes: 5 additions & 5 deletions components/datetime/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "icu-datetime"
name = "icu_datetime"
description = "API for managing Unicode Language and Locale Identifiers"
version = "0.0.1"
authors = ["The ICU4X Project Developers"]
Expand All @@ -15,13 +15,13 @@ include = [
]

[dependencies]
icu-locale = { path = "../locale" }
icu-data-provider = { path = "../data-provider" }
icu_locale = { path = "../locale" }
icu_data_provider = { path = "../data_provider" }

[dev-dependencies]
criterion = "0.3"
icu-data-provider = { path = "../data-provider", features = ["invariant"] }
icu-testdata = { path = "../../resources/testdata" }
icu_data_provider = { path = "../data_provider", features = ["invariant"] }
icu_testdata = { path = "../../resources/testdata" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

Expand Down
4 changes: 2 additions & 2 deletions components/datetime/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! `icu-datetime` is one of the [`ICU4X`] components.
//! `icu_datetime` is one of the [`ICU4X`] components.
//!
//! It is a core API for formatting date and time to user readable textual representation.
//!
Expand Down Expand Up @@ -64,7 +64,7 @@ use pattern::Pattern;
use provider::DateTimeDates;
use std::borrow::Cow;

/// `DateTimeFormat` is the main structure of the `icu-datetime` component.
/// `DateTimeFormat` is the main structure of the `icu_datetime` component.
/// When constructed, it uses data from the `DataProvider`, selected `LanguageIdentifier` and provided options to
/// collect all data necessary to format any dates into that locale.
///
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "icu-fs-data-provider"
name = "icu_fs_data_provider"
description = "ICU4X data provider that reads from structured data files"
version = "0.0.1"
authors = ["The ICU4X Project Developers"]
Expand All @@ -15,8 +15,8 @@ include = [
]

[dependencies]
icu-data-provider = { path = "../data-provider" }
icu-locale = { path = "../locale", features = ["serde"] }
icu_data_provider = { path = "../data_provider" }
icu_locale = { path = "../locale", features = ["serde"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

Expand All @@ -26,12 +26,12 @@ log = { version = "0.4", optional = true }

# Dependencies for the binary
clap = { version = "2.33", optional = true }
icu-cldr-json-data-provider = { path = "../cldr-json-data-provider", features = ["download"], optional = true }
icu_cldr_json_data_provider = { path = "../cldr_json_data_provider", features = ["download"], optional = true }
simple_logger = { version = "1.10", optional = true }

[features]
export = ["erased-serde", "icu-data-provider/invariant", "log"]
export-bin = ["export", "clap", "icu-cldr-json-data-provider", "simple_logger"]
export = ["erased-serde", "icu_data_provider/invariant", "log"]
export-bin = ["export", "clap", "icu_cldr_json_data_provider", "simple_logger"]

[[bin]]
name = "icu4x-cldr-export"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! `icu-fs-data-provider` is one of the [`ICU4X`] components.
//! `icu_fs_data_provider` is one of the [`ICU4X`] components.
//!
//! It reads ICU4X data files from the filesystem in a given directory. It can also export data to
//! the filesystem via an iterable data provider (see the `export` module).
Expand Down
10 changes: 5 additions & 5 deletions components/icu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ include = [
]

[dependencies]
icu-datetime = { path = "../datetime" }
icu-locale = { path = "../locale" }
icu-pluralrules = { path = "../pluralrules" }
icu-unicodeset = { path = "../uniset" }
icu_datetime = { path = "../datetime" }
icu_locale = { path = "../locale" }
icu_plurals = { path = "../plurals" }
icu_uniset = { path = "../uniset" }

[dev-dependencies]
icu-testdata = { path = "../../resources/testdata" }
icu_testdata = { path = "../../resources/testdata" }
4 changes: 2 additions & 2 deletions components/icu/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ pub use icu_datetime as datetime;
#[doc(inline)]
pub use icu_locale as locale;
#[doc(inline)]
pub use icu_pluralrules as plurals;
pub use icu_plurals as plurals;
#[doc(inline)]
pub use icu_unicodeset as uniset;
pub use icu_uniset as uniset;
2 changes: 1 addition & 1 deletion components/locale/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "icu-locale"
name = "icu_locale"
description = "API for managing Unicode Language and Locale Identifiers"
version = "0.0.1"
authors = ["The ICU4X Project Developers"]
Expand Down
2 changes: 1 addition & 1 deletion components/locale/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

ICU4X is a set of internationalization components for Unicode.

# Status [![crates.io](http://meritbadge.herokuapp.com/icu-locale)](https://crates.io/crates/icu-locale)
# Status [![crates.io](http://meritbadge.herokuapp.com/icu_locale)](https://crates.io/crates/icu_locale)

The project is in an incubation period.

Expand Down
6 changes: 3 additions & 3 deletions components/locale/macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "icu-locale-macros"
description = "proc-macros for icu-locale"
name = "icu_locale_macros"
description = "proc-macros for icu_locale"
version = "0.0.1"
authors = ["The ICU4X Project Developers"]
edition = "2018"
Expand All @@ -18,5 +18,5 @@ include = [
proc_macro = true

[dependencies]
icu-locale = { version = "0.0.1", path = "../" }
icu_locale = { version = "0.0.1", path = "../" }
tinystr = "0.3"
2 changes: 1 addition & 1 deletion components/locale/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! `icu-locale` is one of the [`ICU4X`] components.
//! `icu_locale` is one of the [`ICU4X`] components.
//!
//! It is a core API for parsing, manipulating, and serializing Unicode Language
//! and Locale Identifiers.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "icu-pluralrules"
name = "icu_plurals"
description = "Unicode Plural Rules categorizer for numeric input."
version = "0.0.1"
authors = ["The ICU4X Project Developers"]
Expand All @@ -15,17 +15,17 @@ include = [
]

[dependencies]
icu-locale = { path = "../locale" }
icu-data-provider = { path = "../data-provider" }
fixed-decimal = { path = "../../utils/fixed-decimal" }
icu_locale = { path = "../locale" }
icu_data_provider = { path = "../data_provider" }
fixed_decimal = { path = "../../utils/fixed_decimal" }

[dev-dependencies]
criterion = "0.3"
serde = { version = "1.0", features = ["derive"] }
serde_json = {version = "1.0" }
icu-locale = { path = "../locale", features = ["serde"] }
icu-data-provider = { path = "../data-provider", features = ["invariant"] }
icu-testdata = { path = "../../resources/testdata" }
icu_locale = { path = "../locale", features = ["serde"] }
icu_data_provider = { path = "../data_provider", features = ["invariant"] }
icu_testdata = { path = "../../resources/testdata" }

[features]
default = []
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use icu_locale::LanguageIdentifier;
use icu_pluralrules::PluralCategory;
use icu_plurals::PluralCategory;

use serde::Deserialize;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ mod helpers;

use criterion::{black_box, criterion_group, criterion_main, Criterion};
use fixed_decimal::FixedDecimal;
use icu_pluralrules::PluralOperands;
use icu_plurals::PluralOperands;
use std::convert::TryInto;

fn operands(c: &mut Criterion) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use icu_data_provider::{icu_data_key, structs, DataEntry, DataProvider, DataRequ
use std::borrow::Cow;

fn parser(c: &mut Criterion) {
use icu_pluralrules::rules::parse_condition;
use icu_plurals::rules::parse_condition;

let plurals_data = helpers::get_plurals_data();

Expand Down Expand Up @@ -53,7 +53,7 @@ fn parser(c: &mut Criterion) {

#[cfg(feature = "bench")]
c.bench_function("parser/lex", |b| {
use icu_pluralrules::rules::Lexer;
use icu_plurals::rules::Lexer;
b.iter(|| {
for rule in &rules {
let _ = Lexer::new(black_box(rule.as_bytes())).count();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ mod helpers;

use criterion::{criterion_group, criterion_main, Criterion};

use icu_pluralrules::{PluralRuleType, PluralRules};
use icu_plurals::{PluralRuleType, PluralRules};

fn pluralrules(c: &mut Criterion) {
let plurals_data = helpers::get_plurals_data();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// An example application which uses icu_pluralrules to construct a correct
// An example application which uses icu_plurals to construct a correct
// sentence for English based on the numerical value in Ordinal category.
use icu_locale::LanguageIdentifier;
use icu_pluralrules::{PluralCategory, PluralRuleType, PluralRules};
use icu_plurals::{PluralCategory, PluralRuleType, PluralRules};

const VALUES: &[usize] = &[0, 2, 25, 1, 3, 2, 4, 10, 7, 0];

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// An example application which uses icu_pluralrules to construct a correct
// An example application which uses icu_plurals to construct a correct
// sentence for English based on the numerical value in Cardinal category.
use icu_locale::LanguageIdentifier;
use icu_pluralrules::{PluralCategory, PluralRuleType, PluralRules};
use icu_plurals::{PluralCategory, PluralRuleType, PluralRules};

const VALUES: &[usize] = &[0, 2, 25, 1, 3, 2, 4, 10, 7, 0];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
//!
//! ```
//! use icu_locale::LanguageIdentifier;
//! use icu_pluralrules::{PluralCategory, PluralRuleType, PluralOperands};
//! use icu_pluralrules::data::{PluralRuleList, RulesSelector};
//! use icu_plurals::{PluralCategory, PluralRuleType, PluralOperands};
//! use icu_plurals::data::{PluralRuleList, RulesSelector};
//! use icu_data_provider::prelude::*;
//! use icu_data_provider::{InvariantDataProvider, structs};
//! use std::borrow::Cow;
Expand Down
File renamed without changes.
Loading