Created
June 20, 2024 13:18
-
-
Save ryzokuken/4a133af02235f74dd7dbc048def25883 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { MessageFormat } from 'npm:messageformat@next' | |
const decoder = new TextDecoder("utf-8"); | |
const msg = decoder.decode(Deno.readFileSync(Deno.args[0])); | |
const mf = new MessageFormat(msg, Deno.args[1].split(',')); | |
console.log(mf.format(JSON.parse(Deno.args[2] ?? ''))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.match {$total :number} | |
one {{ Showing {$start} - {$end} of {$total} result }} | |
* {{ Showing {$start} - {$end} of {$total} results }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment