Commit b1f03c7f authored by L. Ellenbeck's avatar L. Ellenbeck
Browse files

Merge branch 'Topic/829-languageStringsTSProject' into 'Product/688-languageStrings'

Topic/829-languageStringsTSProject

See merge request coscine/app/i18n!1
parents 8e1b1592 2d11b07d
> 1%
last 2 versions
not ie <= 8
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
stages:
- test
- publish
- release
- pre_release
before_script:
- npm install
test:
stage: test
script:
- npm run build
- npm test
except:
refs:
- tags
variables:
- $GITLAB_USER_ID == $GIT_BOT_USER_ID
publish:
stage: publish
script:
- npm run build
- npx semantic-release
only:
- master
except:
variables:
- $GITLAB_USER_ID == $GIT_BOT_USER_ID
release:
stage: release
script:
- npm run build
artifacts:
paths:
- dist
only:
- tags
pre_release:
stage: pre_release
script:
- npm run build
artifacts:
paths:
- dist
when: manual
except:
- tags
- master
{
"plugins": [
["@semantic-release/commit-analyzer", {
"preset": "eslint"
}],
["@semantic-release/release-notes-generator", {
"preset": "eslint",
}],
["@semantic-release/gitlab", {
"preset": "eslint",
"gitlabUrl": "https://git.rwth-aachen.de"
}],
#Currently not supported
["@semantic-release/npm", {
"preset": "eslint",
"tarballDir": "dist",
"npmPublish": false
}],
["@semantic-release/git", {
"preset": "eslint",
"assets": ["package.json"],
"message": "Chore: ${nextRelease.version}\n\n${nextRelease.notes}"
}]
]
}
\ No newline at end of file
MIT License
Copyright (c) 2020 RWTH Aachen University
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
module.exports = {
presets: [
'@vue/app',
["@babel/preset-env",
{
"targets": {
"ie": "11"
}
}]
],
}
This diff is collapsed.
{
"name": "@coscine/i18n",
"version": "0.0.1",
"private": true,
"directories": {
"doc": "docs"
},
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"test:unit": "vue-cli-service test:unit"
},
"dependencies": {
"vue": "^2.6.11",
"vue-runtime-helpers": "^1.1.2"
},
"devDependencies": {
"@babel/preset-env": "^7.9.5",
"@hutson/semantic-delivery-gitlab": "^9.1.0",
"@semantic-release/commit-analyzer": "^8.0.1",
"@semantic-release/git": "^9.0.0",
"@semantic-release/gitlab": "^6.0.4",
"@semantic-release/npm": "^7.0.5",
"@semantic-release/release-notes-generator": "^9.0.1",
"@types/chai": "^4.2.11",
"@types/mocha": "^7.0.2",
"@vue/cli-plugin-babel": "^4.3.1",
"@vue/cli-plugin-typescript": "^4.3.1",
"@vue/cli-plugin-unit-mocha": "^4.3.1",
"@vue/cli-service": "^4.3.1",
"@vue/test-utils": "1.0.0-beta.33",
"chai": "^4.2.0",
"semantic-release": "^17.0.7",
"typescript": "^3.8.3",
"vue-template-compiler": "^2.6.11"
},
"repository": {
"type": "git",
"url": "https://git.rwth-aachen.de/coscine/app/i18n.git"
},
"license": "MIT"
}
module.exports = {
plugins: {
autoprefixer: {}
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>I18n</title>
</head>
<body>
<noscript>
<strong>We're sorry but I18n doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
</body>
</html>
<script lang="ts">
import Vue from 'vue';
import Default from './apps/default';
import RWTHMaster from './apps/rwthmaster';
import Resources from './apps/resources';
window.coscine = {
i18n: {
default: Default,
rwthmaster: RWTHMaster.languageStrings,
resources: Resources.languageStrings,
},
};
export default Vue.extend({
name: 'i18n',
});
</script>
export default {
en: {
buttons: {
save: 'Save',
cancel: 'Cancel',
back: 'Back',
},
},
de: {
buttons: {
save: 'Speichern',
cancel: 'Abbrechen',
back: 'Zurück',
},
},
};
import Default from './default';
import MergeUtil from '../util/MergeUtil';
const appLanguageStrings = {
en: {
addResource: 'Add Resource',
resources: 'Resources',
},
de: {
addResource: 'Ressource hinzufügen',
resources: 'Ressourcen',
},
};
const languageStrings = MergeUtil.merge(MergeUtil.merge({}, Default), appLanguageStrings);
export default {
languageStrings,
};
import Default from './default';
import MergeUtil from '../util/MergeUtil';
const appLanguageStrings = {
en: {
breadCrumb: {
addResource: 'Add Resource',
createProject: 'Create Project',
editProject: 'Edit Project',
},
footer: {
help: 'Help',
datenschutzLink: 'Disclaimer',
datenschutzLinkHref: 'https://www.rwth-aachen.de/cms/root/Footer/Services/~cesv/Disclaimer/?lidx=1',
imprint: 'Site Credits',
contact: 'Contact',
},
profile: 'Profile',
preferences: 'Preferences',
langBox: 'De',
bannerText: 'CoScInE is currently in the pilot phase. You are welcome to explore the system. Do not use it for your important research data yet! If you have feedback you are welcome to send it to [ <a href="mailto:servicedesk@rwth-aachen.de?subject=CoScInE%20Pilot%20Program">Servicedesk</a> ].',
},
de: {
breadCrumb: {
addResource: 'Ressource hinzufügen',
createProject: 'Projekt erstellen',
editProject: 'Projekt bearbeiten',
},
footer: {
help: 'Hilfe',
datenschutzLink: 'Datenschutzerklärung',
datenschutzLinkHref: 'http://www.rwth-aachen.de/cms/root/Footer/Services/~cesv/Disclaimer/',
imprint: 'Impressum',
contact: 'Kontakt',
},
profile: 'Profil',
preferences: 'Einstellungen',
langBox: 'En',
bannerText: 'CoScInE befindet sich derzeit in der Pilotphase. Sie können das System gerne testen, aber benutzen Sie es nicht für Ihre Forschungsdaten! Feedback und Verbesserungsvorschläge können Sie gerne an [ <a href="mailto:servicedesk@rwth-aachen.de?subject=CoScInE%20Pilot%20Program">Servicedesk</a> ] senden.',
},
};
const languageStrings = MergeUtil.merge(MergeUtil.merge({}, Default), appLanguageStrings);
export default {
languageStrings,
};
declare var coscine: {
i18n: {}
};
declare var _spPageContextInfo: any;
\ No newline at end of file
import Vue from 'vue';
import I18nApp from './I18nApp.vue';
Vue.config.productionTip = false;
new Vue({
render: (h) => h(I18nApp),
});
import Vue, { VNode } from 'vue';
declare global {
namespace JSX {
// tslint:disable no-empty-interface
interface Element extends VNode {}
// tslint:disable no-empty-interface
interface ElementClass extends Vue {}
interface IntrinsicElements {
[elem: string]: any;
}
}
}
declare module '*.vue' {
import Vue from 'vue';
export default Vue;
}
declare module "*.png" {
const value: any;
export default value;
}
\ No newline at end of file
export default{
merge(obj1: any, obj2: any) {
if (obj1 === undefined) {
obj1 = {};
}
for (const prop in obj2) {
if (obj2.hasOwnProperty(prop)) {
if (Object.prototype.toString.call(obj2[prop]) === '[object Object]') {
obj1[prop] = this.merge(obj1[prop], obj2[prop]);
} else {
obj1[prop] = obj2[prop];
}
}
}
return obj1;
},
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment