Skip to content
This repository has been archived by the owner on Jan 5, 2019. It is now read-only.

Commit

Permalink
Version 0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Oct 24, 2017
1 parent 9d440e6 commit 41ac85e
Show file tree
Hide file tree
Showing 3 changed files with 152 additions and 96 deletions.
12 changes: 7 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased](https://github.com/eps1lon/poe-mods/compare/v0.6.1..HEAD)
## [Unreleased](https://github.com/eps1lon/poe-mods/compare/v0.7.0..HEAD)

## [0.7.0](https://github.com/eps1lon/poe-mods/compare/v0.6.1..v0.7.0) (2017-10-24)
### Added
- Plenty more locale data for *.dat files
### Changed
Expand All @@ -13,15 +15,15 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
- `formatStats` doesn't immediately throws if no locale datas are provided.
Instead it will implicitly fail because the provided stats won't be
translated.

## [0.6.1](https://github.com/eps1lon/poe-mods/compare/v0.6.0...v0.6.1) (2017-10-20)
### Changed
- build target is now ES5 to support UglifyJS
### Removed
- replaced `loadLocaleDatas` with `requiredLocaleDatas`. The new method only
lists and not automatically requires the locale data to prevent webpack
from automatically bundling all locale datas.

## [0.6.1](https://github.com/eps1lon/poe-mods/compare/v0.6.0...v0.6.1) (2017-10-20)
### Changed
- build target is now ES5 to support UglifyJS

## [0.6.0](https://github.com/eps1lon/poe-mods/compare/v0.5.0...v0.6.0) (2017-10-18)
### Added
- Gender and pluralization inflection rules for certain languages for Mods by using
Expand Down
69 changes: 39 additions & 30 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,17 @@ declare module "translate/printf" {
export type Params = Array<number | [number, number]>;
export default function printf(text: string, params: Params, formatters?: Formatter[]): string;
}
declare module "formatStats" {
declare module "format/stats" {
import { StatLocaleDatas } from "types/StatDescription";
export type Stat = {
id: string;
value: number | [number, number];
alias?: string;
};
export type OptionalOptions = {
datas?: StatLocaleDatas;
fallback?: Fallback | FallbackCallback;
start_file?: string;
export type Options = {
datas: StatLocaleDatas;
fallback: Fallback | FallbackCallback;
start_file: string;
};
export type TranslatedStats = string[];
export type FallbackCallback = (id: string, stat: Stat) => string | null;
Expand All @@ -102,24 +102,11 @@ declare module "formatStats" {
id = 1,
skip = 2,
}
export type Options = {
datas?: StatLocaleDatas;
fallback: Fallback | FallbackCallback;
start_file: string;
};
export interface FormatStats {
(stats: Stat[], options?: OptionalOptions): TranslatedStats;
options: Options;
configure(options: OptionalOptions): void;
}
const formatStats: FormatStats;
const formatStats: (stats: Stat[], options?: Partial<Options>) => string[];
export default formatStats;
}
declare module "loadLocaleDatas" {
import { FormatStats } from "formatStats";
import { StatLocaleDatas } from "types/StatDescription";
export default function loadLocaleDatas(code: string, files: string[]): StatLocaleDatas;
export function loadLocaleDatasFor(code: string, formatStats: FormatStats): StatLocaleDatas;
declare module "requiredLocaleDatas" {
export default function requiredLocaleDatas(files: string[]): string[];
}
declare module "translate/skill_meta" {
export type Skill = {
Expand All @@ -137,14 +124,35 @@ declare module "translate/skill_meta" {
const _default: SkillMeta;
export default _default;
}
declare module "formatGemStats" {
import { Stat } from "formatStats";
declare module "format/gemStats" {
import { Options, Stat } from "format/stats";
export type GemId = string;
export type OptionalOptions = {
code?: string;
};
export type Translation = string[];
export default function formatGemStats(gem_id: GemId, stats: Stat[], options?: OptionalOptions): Translation;
export default function formatGemStats(gem_id: GemId, stats: Stat[], options?: Partial<Options>): string[];
export function requiredLocaleDatas(gem_id: GemId): string[];
}
declare module "Format" {
import { GemId } from "format/gemStats";
import { Stat } from "format/stats";
import { StatLocaleDatas } from "types/StatDescription";
export enum Fallback {
throw = 0,
id = 1,
skip = 2,
}
export type Options = {
datas: StatLocaleDatas;
fallback: Fallback;
start_file: string;
};
export class Format {
private options;
configure(options: Partial<Options>): void;
stats(stats: Stat[]): string[];
gemStats(gem_id: GemId, stats: Stat[]): string[];
}
const _default: Format;
export default _default;
}
declare module "localize/formatValueRange" {
export type Options = {};
Expand All @@ -156,9 +164,10 @@ declare module "util/inflectionIdentifier" {
}): string;
}
declare module "index" {
export { default as formatStats, Fallback } from "formatStats";
export { default as formatGemStats } from "formatGemStats";
export { default as loadLocaleDatas, loadLocaleDatasFor } from "loadLocaleDatas";
export { default as formatStats, Fallback } from "format/stats";
export { default as formatGemStats } from "format/gemStats";
export { default as format, Format } from "Format";
export { default as requiredLocaleDatas } from "requiredLocaleDatas";
export { default as formatValueRange } from "localize/formatValueRange";
export { formatValue } from "localize/formatValues";
export { default as inflectionIdentifier } from "util/inflectionIdentifier";
Expand Down
Loading

0 comments on commit 41ac85e

Please sign in to comment.