mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-14 16:51:33 +10:00
updates to translations
This commit is contained in:
@ -32,8 +32,8 @@ const App = () => {
|
|||||||
<div className="h-screen overflow-hidden grid grid-cols-5 items-center">
|
<div className="h-screen overflow-hidden grid grid-cols-5 items-center">
|
||||||
<LeftSidebar />
|
<LeftSidebar />
|
||||||
|
|
||||||
<div className="z-0 h-screen col-span-3 flex justify-center items-center overflow-scroll">
|
<div className="z-0 h-screen col-span-3 overflow-scroll flex justify-center items-center">
|
||||||
<div id="page" ref={pageRef} className="my-auto shadow-2xl">
|
<div id="page" ref={pageRef} className="shadow-2xl">
|
||||||
{templates.find(x => theme.layout.toLowerCase() === x.key).component()}
|
{templates.find(x => theme.layout.toLowerCase() === x.key).component()}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -28,13 +28,15 @@ const ActionsTab = ({ data, theme, dispatch }) => {
|
|||||||
pageElement.current.style.maxHeight = 'fit-content';
|
pageElement.current.style.maxHeight = 'fit-content';
|
||||||
pageElement.current.style.overflow = 'visible';
|
pageElement.current.style.overflow = 'visible';
|
||||||
html2canvas(pageElement.current, {
|
html2canvas(pageElement.current, {
|
||||||
|
scale: 6,
|
||||||
useCORS: true,
|
useCORS: true,
|
||||||
allowTaint: true,
|
allowTaint: true,
|
||||||
}).then(canvas => {
|
}).then(canvas => {
|
||||||
pageElement.current.style.maxHeight = '29.7cm';
|
pageElement.current.style.maxHeight = '29.7cm';
|
||||||
pageElement.current.style.overflow = 'scroll';
|
pageElement.current.style.overflow = 'scroll';
|
||||||
|
|
||||||
const image = canvas.toDataURL('image/jpeg', 1.0);
|
const image = canvas.toDataURL('image/jpeg', 1.0);
|
||||||
const doc = new jsPDF('p', 'px', 'a4');
|
const doc = new jsPDF('p', 'mm', 'a4');
|
||||||
const pageWidth = doc.internal.pageSize.getWidth();
|
const pageWidth = doc.internal.pageSize.getWidth();
|
||||||
const pageHeight = doc.internal.pageSize.getHeight();
|
const pageHeight = doc.internal.pageSize.getHeight();
|
||||||
|
|
||||||
@ -48,8 +50,8 @@ const ActionsTab = ({ data, theme, dispatch }) => {
|
|||||||
const marginX = (pageWidth - canvasWidth) / 2;
|
const marginX = (pageWidth - canvasWidth) / 2;
|
||||||
const marginY = (pageHeight - canvasHeight) / 2;
|
const marginY = (pageHeight - canvasHeight) / 2;
|
||||||
|
|
||||||
doc.addImage(image, 'JPEG', marginX, marginY, canvasWidth, canvasHeight);
|
doc.addImage(image, 'JPEG', marginX, marginY, canvasWidth, canvasHeight, null, 'SLOW');
|
||||||
doc.output('dataurlnewwindow');
|
doc.save(`RxResume_${Date.now()}.pdf`);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -62,8 +64,8 @@ const ActionsTab = ({ data, theme, dispatch }) => {
|
|||||||
dlAnchor.click();
|
dlAnchor.click();
|
||||||
};
|
};
|
||||||
|
|
||||||
const loadDummyData = () => {
|
const loadDemoData = () => {
|
||||||
dispatch({ type: 'load_dummy_data' });
|
dispatch({ type: 'load_demo_data' });
|
||||||
dispatch({ type: 'save_data' });
|
dispatch({ type: 'save_data' });
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -118,12 +120,24 @@ const ActionsTab = ({ data, theme, dispatch }) => {
|
|||||||
|
|
||||||
<div className="text-sm">
|
<div className="text-sm">
|
||||||
<Trans t={t} i18nKey="actions.printResume.body">
|
<Trans t={t} i18nKey="actions.printResume.body">
|
||||||
You can simply press <pre className="inline font-bold">Cmd/Ctrl + P</pre> at any time
|
You can click on the button below to generate a PDF instantly. Alternatively, you can
|
||||||
while you're in the app to print your resume, but here's a fancy button to do
|
also use <pre className="inline font-bold">Cmd/Ctrl + P</pre> but it would have
|
||||||
the same thing, just 'cause.
|
different effects.
|
||||||
</Trans>
|
</Trans>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="mt-1 grid grid-cols-2 col-gap-6">
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={printAsPdf}
|
||||||
|
className="mt-4 bg-blue-600 hover:bg-blue-700 text-white text-sm font-medium py-2 px-5 rounded"
|
||||||
|
>
|
||||||
|
<div className="flex justify-center items-center">
|
||||||
|
<i className="material-icons mr-2 font-bold text-base">import_export</i>
|
||||||
|
<span className="text-sm">{t('actions.printResume.buttons.export')}</span>
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={printAsPdf}
|
onClick={printAsPdf}
|
||||||
@ -135,22 +149,23 @@ const ActionsTab = ({ data, theme, dispatch }) => {
|
|||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<hr className="my-6" />
|
<hr className="my-6" />
|
||||||
|
|
||||||
<div className="shadow text-center p-5">
|
<div className="shadow text-center p-5">
|
||||||
<h6 className="font-bold text-sm mb-2">{t('actions.loadDummyData.heading')}</h6>
|
<h6 className="font-bold text-sm mb-2">{t('actions.loadDemoData.heading')}</h6>
|
||||||
|
|
||||||
<div className="text-sm">{t('actions.loadDummyData.body')}</div>
|
<div className="text-sm">{t('actions.loadDemoData.body')}</div>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={loadDummyData}
|
onClick={loadDemoData}
|
||||||
className="mt-4 bg-green-600 hover:bg-green-700 text-white text-sm font-medium py-2 px-5 rounded"
|
className="mt-4 bg-green-600 hover:bg-green-700 text-white text-sm font-medium py-2 px-5 rounded"
|
||||||
>
|
>
|
||||||
<div className="flex justify-center items-center">
|
<div className="flex justify-center items-center">
|
||||||
<i className="material-icons mr-2 font-bold text-base">flight_takeoff</i>
|
<i className="material-icons mr-2 font-bold text-base">flight_takeoff</i>
|
||||||
<span className="text-sm">{t('actions.loadDummyData.buttons.loadData')}</span>
|
<span className="text-sm">{t('actions.loadDemoData.buttons.loadData')}</span>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import get from 'lodash/get';
|
|||||||
import set from 'lodash/set';
|
import set from 'lodash/set';
|
||||||
import remove from 'lodash/remove';
|
import remove from 'lodash/remove';
|
||||||
|
|
||||||
import dummyData from '../assets/dummy/data.json';
|
import demoData from '../assets/demo/data.json';
|
||||||
import { move } from '../utils';
|
import { move } from '../utils';
|
||||||
|
|
||||||
const initialState = {
|
const initialState = {
|
||||||
@ -125,15 +125,15 @@ const reducer = (state, { type, payload }) => {
|
|||||||
...state,
|
...state,
|
||||||
...payload,
|
...payload,
|
||||||
};
|
};
|
||||||
case 'load_dummy_data':
|
case 'load_demo_data':
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
...dummyData,
|
...demoData,
|
||||||
};
|
};
|
||||||
case 'reset':
|
case 'reset':
|
||||||
return initialState;
|
return initialState;
|
||||||
default:
|
default:
|
||||||
throw state;
|
return state;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import i18n from 'i18next';
|
import i18n from 'i18next';
|
||||||
import { initReactI18next } from 'react-i18next';
|
import { initReactI18next } from 'react-i18next';
|
||||||
|
|
||||||
import resources from './locales';
|
import resources from './source';
|
||||||
|
|
||||||
const languages = [
|
const languages = [
|
||||||
{
|
{
|
||||||
|
|||||||
3
src/i18n/source/app/index.js
Normal file
3
src/i18n/source/app/index.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
import app from './app.json';
|
||||||
|
|
||||||
|
export default app;
|
||||||
9
src/i18n/source/index.js
Normal file
9
src/i18n/source/index.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import app from './app';
|
||||||
|
import leftSidebar from './leftSidebar';
|
||||||
|
import rightSidebar from './rightSidebar';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
app,
|
||||||
|
leftSidebar,
|
||||||
|
rightSidebar,
|
||||||
|
};
|
||||||
@ -8,6 +8,6 @@
|
|||||||
"placeholder": "Udacity"
|
"placeholder": "Udacity"
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"placeholder": "You can write about what you learnt from your certification program."
|
"placeholder": "You can write about what you learned from your certification program."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
23
src/i18n/source/leftSidebar/index.js
Normal file
23
src/i18n/source/leftSidebar/index.js
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import profile from './profile.json';
|
||||||
|
import objective from './objective.json';
|
||||||
|
import work from './work.json';
|
||||||
|
import education from './education.json';
|
||||||
|
import awards from './awards.json';
|
||||||
|
import certifications from './certifications.json';
|
||||||
|
import skills from './skills.json';
|
||||||
|
import languages from './languages.json';
|
||||||
|
import references from './references.json';
|
||||||
|
import extras from './extras.json';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
profile,
|
||||||
|
objective,
|
||||||
|
work,
|
||||||
|
education,
|
||||||
|
awards,
|
||||||
|
certifications,
|
||||||
|
skills,
|
||||||
|
languages,
|
||||||
|
references,
|
||||||
|
extras,
|
||||||
|
};
|
||||||
@ -11,16 +11,17 @@
|
|||||||
},
|
},
|
||||||
"printResume": {
|
"printResume": {
|
||||||
"heading": "Print Your Resume",
|
"heading": "Print Your Resume",
|
||||||
"body": "You can simply press <1>Cmd/Ctrl + P</1> at any time while you're in the app to print your resume, but here's a fancy button to do the same thing, just 'cause.",
|
"body": "You can click on the button below to generate a PDF instantly. Alternatively, you can also use <1>Cmd/Ctrl + P</1> but it would have different effects.",
|
||||||
"buttons": {
|
"buttons": {
|
||||||
|
"export": "Export",
|
||||||
"print": "Print"
|
"print": "Print"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"loadDummyData": {
|
"loadDemoData": {
|
||||||
"heading": "Load Dummy Data",
|
"heading": "Load Demo Data",
|
||||||
"body": "Unclear on what to do with a fresh blank page? Load some dummy data with prepopulated values to see how a resume should look and you can start editing from there.",
|
"body": "Unclear on what to do with a fresh blank page? Load some demo data with prepopulated values to see how a resume should look and you can start editing from there.",
|
||||||
"buttons": {
|
"buttons": {
|
||||||
"loadData": "Populate Data"
|
"loadData": "Load Data"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"reset": {
|
"reset": {
|
||||||
|
|||||||
15
src/i18n/source/rightSidebar/index.js
Normal file
15
src/i18n/source/rightSidebar/index.js
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import templates from './templates.json';
|
||||||
|
import colors from './colors.json';
|
||||||
|
import fonts from './fonts.json';
|
||||||
|
import actions from './actions.json';
|
||||||
|
import settings from './settings.json';
|
||||||
|
import about from './about.json';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
templates,
|
||||||
|
colors,
|
||||||
|
fonts,
|
||||||
|
actions,
|
||||||
|
settings,
|
||||||
|
about,
|
||||||
|
};
|
||||||
@ -2,6 +2,6 @@
|
|||||||
"title": "Settings",
|
"title": "Settings",
|
||||||
"language": {
|
"language": {
|
||||||
"label": "Language",
|
"label": "Language",
|
||||||
"helpText": "If you would like to help translate the app into your own language, please refer the <1>Translation Documentation</1>."
|
"helpText": "If you would like to help translate the app into your own language, please refer to the <1>Translation Documentation</1>."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -68,7 +68,8 @@ ul li {
|
|||||||
width: 21cm;
|
width: 21cm;
|
||||||
min-height: 29.7cm;
|
min-height: 29.7cm;
|
||||||
max-height: 29.7cm;
|
max-height: 29.7cm;
|
||||||
zoom: 0.8;
|
transform: scale(0.8);
|
||||||
|
transform-origin: center;
|
||||||
overflow: scroll;
|
overflow: scroll;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -234,6 +234,7 @@ const Pikachu = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
className="p-10"
|
||||||
style={{
|
style={{
|
||||||
fontFamily: theme.font.family,
|
fontFamily: theme.font.family,
|
||||||
backgroundColor: theme.colors.background,
|
backgroundColor: theme.colors.background,
|
||||||
|
|||||||
Reference in New Issue
Block a user