Skip to content

Commit fc96730

Browse files
committed
Merge k3
2 parents 414796c + b3e2fb3 commit fc96730

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+8260
-5067
lines changed

.gitattributes

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
docs export-ignore
2+
src export-ignore
3+
tests export-ignore
4+
.gitattributes export-ignore
5+
.gitignore export-ignore
6+
package-lock.json export-ignore
7+
package.json export-ignore
8+
webpack.config.js export-ignore

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
node_modules
1+
/node_modules/

README.md

-62
This file was deleted.

composer.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "oblik/kirby-memsource",
3+
"description": "Kirby integration for the Memsource TMS service.",
4+
"type": "kirby-plugin",
5+
"license": "MIT",
6+
"authors": [
7+
{
8+
"name": "Hristiyan Dodov",
9+
"email": "[email protected]"
10+
}
11+
],
12+
"require": {
13+
"getkirby/composer-installer": "^1.1",
14+
"oblik/kirby-outsource": "^1.0",
15+
"oblik/kirby-variables": "^2.0",
16+
"oblik/kirby-json": "^1.0"
17+
},
18+
"extra": {
19+
"installer-name": "memsource"
20+
}
21+
}

docs/README.md

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Kirby Memsource
2+
3+
This plugin allows you to translate your entire site content in the powerful TMS [Memsource](https://www.memsource.com/). Features:
4+
5+
- Create Memsource jobs with great control over what's exported
6+
- Import Memsource jobs with reports for what has changed
7+
- Functionality to capture the state of your site and use it as a reference so you can later export only the differences
8+
- Support for the [Kirby Editor](https://github.com/getkirby/editor)
9+
- Great control over the exported format of fields via [kirby-outsource](https://github.com/OblikStudio/kirby-outsource)
10+
- Functionality to translate language variables via [kirby-variables](https://github.com/OblikStudio/kirby-variables)
11+
12+
Exporting content:
13+
14+
![export demo](export.gif)
15+
16+
Importing content:
17+
18+
![import demo](import.gif)
19+
20+
## Installation
21+
22+
With [Composer](https://packagist.org/packages/oblik/kirby-outsource):
23+
24+
```
25+
composer require oblik/kirby-memsource
26+
```
27+
28+
[Sign up](https://cloud.memsource.com/web/organization/signup?e=DEVELOPER) for a developer account in Memsource.
29+
30+
## Usage
31+
32+
You can specify how each filed type should be exported for translation. For example, if you have a field formatted in YAML, you can specify that YAML should be parsed on export and encoded on import like this:
33+
34+
```yml
35+
fields:
36+
data:
37+
type: myfield
38+
outsource:
39+
serialize:
40+
yaml: true
41+
```
42+
43+
If you don't want to specify that for each occurrence of the `myfield` field type, use _config.php_:
44+
45+
```php
46+
return [
47+
'oblik.memsource.fields' => [
48+
'myfield' => [
49+
'serialize' => [
50+
'yaml' => true
51+
]
52+
]
53+
]
54+
];
55+
```
56+
57+
For more information on that, refer to the [kirby-outsource](https://github.com/OblikStudio/kirby-outsource#field-settings) documentation.

docs/export.gif

1.36 MB
Loading

docs/import.gif

421 KB
Loading

gulpfile.js

-53
This file was deleted.

index.css

+149
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
.k-panel-view {
2+
transform: none; }
3+
4+
@charset "UTF-8";
5+
.ms-crumbs {
6+
padding: 0.625rem;
7+
font-size: 0.75rem;
8+
font-weight: 500;
9+
text-align: center;
10+
text-transform: uppercase;
11+
border: 1px solid #ccc;
12+
}
13+
.ms-crumbs__crumb {
14+
display: inline-block;
15+
line-height: 1;
16+
}
17+
.ms-crumbs__crumb button {
18+
font-size: inherit;
19+
font-weight: inherit;
20+
text-transform: inherit;
21+
outline: none;
22+
opacity: 0.75;
23+
}
24+
.ms-crumbs__crumb button:after {
25+
content: '→';
26+
margin: 0 8px;
27+
user-select: none;
28+
opacity: 0.5;
29+
}
30+
.ms-crumbs__crumb button:hover, .ms-crumbs__crumb button:focus {
31+
opacity: 1;
32+
}
33+
34+
.k-list-item[data-v-80f4a2f4] {
35+
cursor: pointer;
36+
}
37+
38+
[data-v-c94c5776] {
39+
position: relative;
40+
}
41+
.k-input[data-v-c94c5776] {
42+
padding-right: 40px;
43+
}
44+
.k-list-item-options[data-v-c94c5776] {
45+
position: absolute;
46+
right: 0;
47+
bottom: 0;
48+
}
49+
50+
[data-v-1d400931] .k-list-item .k-button {
51+
display: flex;
52+
align-items: center;
53+
margin-left: -10px;
54+
top: 2px;
55+
}
56+
[data-v-1d400931] .k-list-item .k-button,[data-v-1d400931] .k-list-item .k-button input {
57+
cursor: pointer;
58+
}
59+
60+
.ms-diff-entry + .ms-diff-entry[data-v-5f63a496] {
61+
margin-top: 1rem;
62+
}
63+
.ms-diff-entry p[data-v-5f63a496] {
64+
font-family: monospace;
65+
margin-left: 11px;
66+
margin-bottom: 0.3rem;
67+
}
68+
[data-v-5f63a496] .d2h-file-wrapper {
69+
margin: 0;
70+
overflow: hidden;
71+
background: white;
72+
border-radius: 0;
73+
border-color: #ccc;
74+
}
75+
[data-v-5f63a496] .d2h-files-diff {
76+
display: flex;
77+
}
78+
[data-v-5f63a496] .d2h-file-diff,[data-v-5f63a496] .d2h-file-side-diff {
79+
margin: 0;
80+
overflow-x: auto;
81+
}
82+
[data-v-5f63a496] .d2h-file-diff + .d2h-file-side-diff,[data-v-5f63a496] .d2h-file-side-diff + .d2h-file-side-diff {
83+
border-left: 1px solid #ccc;
84+
}
85+
[data-v-5f63a496] .d2h-diff-tbody tr:first-child {
86+
display: none;
87+
}
88+
[data-v-5f63a496] .d2h-diff-tbody tr .d2h-code-line-prefix {
89+
display: none;
90+
}
91+
[data-v-5f63a496] .d2h-diff-tbody tr .d2h-code-side-linenumber {
92+
display: none;
93+
}
94+
[data-v-5f63a496] .d2h-diff-tbody tr .d2h-code-side-line {
95+
margin: 0;
96+
}
97+
98+
[data-v-16da749a] [data-back] {
99+
color: #fff;
100+
}
101+
[data-v-16da749a] [data-back="imported"] {
102+
background: #5d800d;
103+
}
104+
[data-v-16da749a] [data-back="empty"] {
105+
background: #000;
106+
}
107+
[data-v-16da749a] [data-back="error"] {
108+
background: #800d0d;
109+
}
110+
.k-list-item[data-v-16da749a] {
111+
cursor: pointer;
112+
}
113+
.k-headline[data-v-16da749a] {
114+
text-align: center;
115+
}
116+
.ms-diff[data-v-16da749a] {
117+
margin-top: 1.5rem;
118+
}
119+
120+
[data-v-8095f88c] .k-list-item-text strong {
121+
margin-left: 10px;
122+
}
123+
124+
.k-view[data-v-7ba5bd90] {
125+
max-width: 50rem;
126+
}
127+
.k-view.ms-loading .k-header[data-v-7ba5bd90] {
128+
pointer-events: none;
129+
opacity: 0.6;
130+
}
131+
.k-header[data-v-7ba5bd90] {
132+
transition: opacity 0.1s ease-out;
133+
}
134+
.k-tab-button[aria-current][data-v-7ba5bd90]:after {
135+
display: none;
136+
}
137+
.k-tab-button.k-button[data-v-7ba5bd90] {
138+
width: 100%;
139+
}
140+
.k-box + .k-box[data-v-7ba5bd90] {
141+
margin-top: 5px;
142+
}
143+
[data-v-7ba5bd90] .ms-crumbs {
144+
border-bottom: none;
145+
}
146+
[data-v-7ba5bd90] .k-form .k-button-group {
147+
margin-top: 1rem;
148+
}
149+

index.js

+100
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)