Skip to content

Commit

Permalink
Rename icu-pluralrules -> icu-plurals and icu-unicodeset -> icu-uniset (
Browse files Browse the repository at this point in the history
  • Loading branch information
zbraniecki authored Oct 10, 2020
1 parent 5f9af94 commit e3cfe00
Show file tree
Hide file tree
Showing 40 changed files with 98 additions and 98 deletions.
2 changes: 1 addition & 1 deletion 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/plurals/ @zbraniecki @sffc
components/data-provider/ @sffc
components/data-provider-json/ @sffc
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ members = [
"components/uniset",
"components/locale",
"components/locale/macros",
"components/pluralrules",
"components/plurals",
"components/datetime",
"resources/testdata",
"utils/fixed-decimal",
Expand Down
2 changes: 1 addition & 1 deletion components/cldr-json-data-provider/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ include = [
[dependencies]
icu-data-provider = { path = "../data-provider" }
icu-locale = { path = "../locale" }
icu-pluralrules = { path = "../pluralrules" }
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
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
4 changes: 2 additions & 2 deletions components/icu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ include = [
[dependencies]
icu-datetime = { path = "../datetime" }
icu-locale = { path = "../locale" }
icu-pluralrules = { path = "../pluralrules" }
icu-unicodeset = { path = "../uniset" }
icu-plurals = { path = "../plurals" }
icu-uniset = { path = "../uniset" }

[dev-dependencies]
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;
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 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
File renamed without changes.
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.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! `icu-pluralrules` is one of the [`ICU4X`] components.
//! `icu-plurals` is one of the [`ICU4X`] components.
//!
//! This API provides functionality to determine the plural category
//! appropriate for a given number in a given language.
Expand All @@ -21,7 +21,7 @@
//!
//! ```
//! use icu_locale::LanguageIdentifier;
//! use icu_pluralrules::{PluralRules, PluralRuleType, PluralCategory};
//! use icu_plurals::{PluralRules, PluralRuleType, PluralCategory};
//! use icu_data_provider::InvariantDataProvider;
//!
//! let lang: LanguageIdentifier = "en".parse()
Expand Down Expand Up @@ -131,7 +131,7 @@ pub enum PluralRuleType {
///
/// ```
/// use icu_locale::LanguageIdentifier;
/// use icu_pluralrules::{PluralRules, PluralRuleType, PluralCategory};
/// use icu_plurals::{PluralRules, PluralRuleType, PluralCategory};
/// use icu_data_provider::InvariantDataProvider;
///
/// let lang: LanguageIdentifier = "en".parse()
Expand Down Expand Up @@ -207,7 +207,7 @@ impl PluralCategory {
/// # Examples
///
/// ```
/// use icu_pluralrules::PluralCategory;
/// use icu_plurals::PluralCategory;
///
/// let mut categories = PluralCategory::all();
///
Expand Down Expand Up @@ -239,7 +239,7 @@ impl PluralCategory {
///
/// ```
/// use icu_locale::LanguageIdentifier;
/// use icu_pluralrules::{PluralRules, PluralRuleType, PluralCategory};
/// use icu_plurals::{PluralRules, PluralRuleType, PluralCategory};
/// use icu_data_provider::InvariantDataProvider;
///
/// let lang: LanguageIdentifier = "en".parse()
Expand Down Expand Up @@ -271,7 +271,7 @@ impl PluralRules {
///
/// ```
/// use icu_locale::LanguageIdentifier;
/// use icu_pluralrules::{PluralRules, PluralRuleType};
/// use icu_plurals::{PluralRules, PluralRuleType};
/// use icu_data_provider::InvariantDataProvider;
///
/// let lang: LanguageIdentifier = "en".parse()
Expand Down Expand Up @@ -316,7 +316,7 @@ impl PluralRules {
///
/// ```
/// use icu_locale::LanguageIdentifier;
/// use icu_pluralrules::{PluralRules, PluralRuleType, PluralCategory};
/// use icu_plurals::{PluralRules, PluralRuleType, PluralCategory};
/// use icu_data_provider::InvariantDataProvider;
///
/// let lang: LanguageIdentifier = "en".parse()
Expand Down Expand Up @@ -346,8 +346,8 @@ impl PluralRules {
/// ```
/// # use std::convert::TryFrom;
/// # use icu_locale::LanguageIdentifier;
/// # use icu_pluralrules::{PluralRules, PluralRuleType};
/// use icu_pluralrules::{PluralCategory, PluralOperands};
/// # use icu_plurals::{PluralRules, PluralRuleType};
/// use icu_plurals::{PluralCategory, PluralOperands};
/// # use icu_data_provider::InvariantDataProvider;
/// #
/// # let lang: LanguageIdentifier = "en".parse()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use std::str::FromStr;
/// From int
///
/// ```
/// use icu_pluralrules::PluralOperands;
/// use icu_plurals::PluralOperands;
/// assert_eq!(PluralOperands {
/// i: 2,
/// v: 0,
Expand All @@ -29,7 +29,7 @@ use std::str::FromStr;
///
/// ```
/// use std::str::FromStr;
/// use icu_pluralrules::PluralOperands;
/// use icu_plurals::PluralOperands;
/// assert_eq!(Ok(PluralOperands {
/// i: 1234,
/// v: 3,
Expand All @@ -43,7 +43,7 @@ use std::str::FromStr;
///
/// ```
/// use std::convert::TryFrom;
/// use icu_pluralrules::PluralOperands;
/// use icu_plurals::PluralOperands;
/// assert_eq!(Ok(PluralOperands {
/// i: 123,
/// v: 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
//! # Examples
//!
//! ```
//! use icu_pluralrules::rules::parse_condition;
//! use icu_pluralrules::rules::ast::*;
//! use icu_plurals::rules::parse_condition;
//! use icu_plurals::rules::ast::*;
//!
//! let input = "i = 1";
//!
Expand Down Expand Up @@ -42,8 +42,8 @@ use std::ops::RangeInclusive;
/// # Examples
///
/// ```
/// use icu_pluralrules::rules::ast::*;
/// use icu_pluralrules::rules::{parse, parse_condition};
/// use icu_plurals::rules::ast::*;
/// use icu_plurals::rules::{parse, parse_condition};
///
/// let condition = parse_condition(b"i = 5 or v = 2")
/// .expect("Parsing failed.");
Expand Down Expand Up @@ -87,8 +87,8 @@ pub struct Rule {
/// # Examples
///
/// ```
/// use icu_pluralrules::rules::ast::*;
/// use icu_pluralrules::rules::parse_condition;
/// use icu_plurals::rules::ast::*;
/// use icu_plurals::rules::parse_condition;
///
/// let condition = Condition(Box::new([
/// AndCondition(Box::new([Relation {
Expand Down Expand Up @@ -131,7 +131,7 @@ pub struct Condition(pub Box<[AndCondition]>);
/// Can be represented by the AST:
///
/// ```
/// use icu_pluralrules::rules::ast::*;
/// use icu_plurals::rules::ast::*;
///
/// AndCondition(Box::new([
/// Relation {
Expand Down Expand Up @@ -169,7 +169,7 @@ pub struct AndCondition(pub Box<[Relation]>);
/// Can be represented by the AST:
///
/// ```
/// use icu_pluralrules::rules::ast::*;
/// use icu_plurals::rules::ast::*;
///
/// Relation {
/// expression: Expression {
Expand Down Expand Up @@ -216,7 +216,7 @@ pub enum Operator {
/// Can be represented by the AST:
///
/// ```
/// use icu_pluralrules::rules::ast::*;
/// use icu_plurals::rules::ast::*;
///
/// Expression {
/// operand: Operand::I,
Expand All @@ -243,7 +243,7 @@ pub struct Expression {
/// Can be represented by the AST:
///
/// ```
/// use icu_pluralrules::rules::ast::Operand;
/// use icu_plurals::rules::ast::Operand;
///
/// Operand::I;
/// ```
Expand Down Expand Up @@ -276,7 +276,7 @@ pub enum Operand {
/// Can be represented by the AST:
///
/// ```
/// use icu_pluralrules::rules::ast::*;
/// use icu_plurals::rules::ast::*;
///
/// RangeList(Box::new([
/// RangeListItem::Value(Value(5)),
Expand All @@ -302,7 +302,7 @@ pub struct RangeList(pub Box<[RangeListItem]>);
/// Can be represented by the AST:
///
/// ```
/// use icu_pluralrules::rules::ast::*;
/// use icu_plurals::rules::ast::*;
///
/// let _ = RangeListItem::Value(Value(5));
/// let _ = RangeListItem::Range(Value(11)..=Value(15));
Expand All @@ -326,7 +326,7 @@ pub enum RangeListItem {
/// Can be represented by the AST:
///
/// ```
/// use icu_pluralrules::rules::ast::*;
/// use icu_plurals::rules::ast::*;
///
/// RangeListItem::Value(Value(99));
/// ```
Expand All @@ -342,7 +342,7 @@ pub struct Value(pub u64);
/// ```
///
/// ```
/// use icu_pluralrules::rules::ast::*;
/// use icu_plurals::rules::ast::*;
/// Samples {
/// integer: Some(SampleList {
/// sample_ranges: Box::new([SampleRange {
Expand Down Expand Up @@ -375,7 +375,7 @@ pub struct Samples {
/// ```
///
/// ```
/// use icu_pluralrules::rules::ast::*;
/// use icu_plurals::rules::ast::*;
/// SampleList {
/// sample_ranges: Box::new([
/// SampleRange {
Expand All @@ -401,7 +401,7 @@ pub struct SampleList {
/// ```
///
/// ```
/// use icu_pluralrules::rules::ast::*;
/// use icu_plurals::rules::ast::*;
/// SampleRange {
/// lower_val: DecimalValue("0.0".to_string()),
/// upper_val: Some(DecimalValue("1.5".to_string())),
Expand All @@ -422,7 +422,7 @@ pub struct SampleRange {
/// ```
///
/// ```
/// use icu_pluralrules::rules::ast::*;
/// use icu_plurals::rules::ast::*;
/// DecimalValue("1.00".to_string());
/// ```
#[derive(Debug, Clone, PartialEq)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub enum LexerError {
/// # Examples
///
/// ```
/// use icu_pluralrules::rules::Lexer;
/// use icu_plurals::rules::Lexer;
///
/// let input = b"i = 5";
/// let lexer = Lexer::new(input);
Expand All @@ -49,7 +49,7 @@ impl<'l> Lexer<'l> {
/// # Examples
///
/// ```
/// use icu_pluralrules::rules::Lexer;
/// use icu_plurals::rules::Lexer;
///
/// Lexer::new(b"n = 1");
/// ```
Expand Down
Loading

0 comments on commit e3cfe00

Please sign in to comment.