-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
177 additions
and
153 deletions.
There are no files selected for viewing
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"New version": "Neue Version", | ||
"New upload": "Neuer Upload", | ||
"Edit upload": "Upload bearbeiten", | ||
"Storage available": "Verfügbarer Speicherplatz" | ||
} |
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"New version": "New version", | ||
"New upload": "New upload", | ||
"Edit upload": "Edit upload", | ||
"Storage available": "Storage available", | ||
"Add identifier": "Add identifier" | ||
} |
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"New version": "", | ||
"New upload": "", | ||
"Edit upload": "", | ||
"Storage available": "" | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// This file is part of React-Invenio-Deposit | ||
// Copyright (C) 2021 Graz University of Technology. | ||
// | ||
// React-Invenio-Deposit is free software; you can redistribute it and/or modify it | ||
// under the terms of the MIT License; see LICENSE file for more details. | ||
|
||
const { readFileSync, writeFileSync } = require('fs'); | ||
const { gettextToI18next } = require('i18next-conv'); | ||
const { languages } = require('./package').config; | ||
|
||
// it accepts the same options as the cli. | ||
// https://github.com/i18next/i18next-gettext-converter#options | ||
const options = { | ||
/* you options here */ | ||
}; | ||
|
||
function save(target) { | ||
return (result) => { | ||
writeFileSync(target, result); | ||
}; | ||
} | ||
|
||
if ('lang' === process.argv[2]) { | ||
const lang = process.argv[3]; | ||
gettextToI18next( | ||
lang, | ||
readFileSync(`src/lib/translations/${lang}/messages.po`), | ||
options | ||
).then(save(`src/lib/translations/${lang}/translations.json`)); | ||
} else { | ||
for (const lang of languages) { | ||
gettextToI18next( | ||
lang, | ||
readFileSync(`src/lib/translations/${lang}/messages.po`), | ||
options | ||
).then(save(`src/lib/translations/${lang}/translations.json`)); | ||
} | ||
} |
Oops, something went wrong.