Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jun 8, 2019. It is now read-only.

Add overrideIdFn option to allow manipulation of IDs during extraction#162

Merged
longlho merged 2 commits intoformatjs:masterfromjoual:override-id-fn
May 22, 2019
Merged

Add overrideIdFn option to allow manipulation of IDs during extraction#162

longlho merged 2 commits intoformatjs:masterfromjoual:override-id-fn
May 22, 2019

Conversation

@joual
Copy link
Contributor

@joualjoual commentedNov 20, 2018
edited
Loading

Adds the possibility to override message IDs during extraction both for.json and.js output by providing an override function with the signature(id: string, defaultMessage:string, description: string|object) => string

Example:

transform(path.join(fixtureDir, 'actual.js'), {    overrideIdFn: (id, defaultMessage, description) => {        return `HELLO.${id}.${defaultMessage.length}.${typeof description}`;    },});

@longlholonglho merged commit95d9121 intoformatjs:masterMay 22, 2019
@longlholonglho mentioned this pull requestMay 22, 2019
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@joual@longlho

[8]ページ先頭

©2009-2025 Movatter.jp