Skip to content

Commit b16cb61

Browse files
committed
WIP
1 parent 856ad30 commit b16cb61

File tree

11 files changed

+912
-321
lines changed

11 files changed

+912
-321
lines changed

classes/output/translator.php

Lines changed: 625 additions & 0 deletions
Large diffs are not rendered by default.

lang/en/local_amos.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,9 +441,9 @@
441441
$string['stashsubmitsubject'] = 'Subject';
442442
$string['stashtitle'] = 'Stash title';
443443
$string['stashtitledefault'] = 'Work in progress - {$a->time}';
444-
$string['stringhistory'] = 'History';
444+
$string['stringhistory'] = 'history';
445445
$string['strings'] = 'Strings';
446-
$string['stringversionnotlatest'] = 'There exists a more recent version of the string!';
446+
$string['stringversionnotlatest'] = 'more recent version exists';
447447
$string['submitting'] = 'Submitting a contribution';
448448
$string['submitting_help'] = 'This will send translated strings to official language maintainers. They will be able to apply your work into their stage, review it and eventually commit. Please provide a message for them describing your work and why you would like to see your contribution included.';
449449
$string['targetversion'] = 'Target version';

renderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class local_amos_renderer extends plugin_renderer_base {
3636
* @param local_amos_translator $translator
3737
* @return string
3838
*/
39-
protected function render_local_amos_translator(local_amos_translator $translator) {
39+
protected function render_local_amos_translator2(local_amos_translator $translator) {
4040
global $PAGE;
4141

4242
$listlanguages = mlang_tools::list_languages();

scss/filter.scss

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
// Strings filter at the translator page.
2+
#page-local-amos-view #amosfilter {
23

3-
#page-local-amos-view #region-main {
4-
overflow-x: auto;
5-
}
6-
7-
.path-local-amos {
8-
4+
// Default help texts are designed to be shown below the field. We display them below labels - fix the spacing.
95
label + .form-text {
106
margin-top: 0;
117
margin-bottom: 0.25rem;
128
}
139

10+
// Once a component is selected, highlight it in bold.
1411
#amosfilter_fcmp input[type=checkbox]:checked + label {
1512
font-weight: bold;
1613
}

scss/strings.scss

Lines changed: 0 additions & 47 deletions
This file was deleted.

scss/styles.scss

Lines changed: 11 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
@import "variables.scss";
22
@import "sitefrontpage.scss";
33
@import "filter.scss";
4-
@import "strings.scss";
4+
@import "translator";
55
@import "stage.scss";
66
@import "index.scss";
77
@import "comment.scss";
88

9+
#page-local-amos-view {
10+
// Avoid content overlap with side blocks.
11+
#region-main {
12+
overflow-x: auto;
13+
}
914

10-
// Styles used within the AMOS tool itself
15+
h2 {
16+
text-align: center;
17+
}
18+
}
1119

1220
.path-local-amos {
1321

@@ -20,7 +28,7 @@
2028
}
2129
}
2230

23-
#amostranslator {
31+
#amostranslatorold {
2432

2533
.string-text {
2634
textarea.translation-edit {
@@ -93,45 +101,6 @@
93101
background-color: $amos-color-staged;
94102
}
95103

96-
.path-local-amos #amostranslator .stringinfo .metainfo {
97-
color: #999;
98-
font-size: small;
99-
}
100-
101-
.path-local-amos #amostranslator .placeholderinfo,
102-
.path-local-amos #amostranslator .greylistedinfo {
103-
display: inline-block;
104-
vertical-align: middle;
105-
}
106-
107-
#page-local-amos-index h1.main,
108-
#page-local-amos-index h2.main {
109-
text-align: left;
110-
}
111-
112-
#page-local-amos-credits .thanks {
113-
text-align:center;
114-
}
115-
116-
#page-local-amos-credits .quicklinks {
117-
text-align: center;
118-
margin: 1em auto 2em;
119-
padding: 10px;
120-
border: 1px solid #eee;
121-
background-color: #f9f9f9;
122-
}
123-
124-
#page-local-amos-credits .quicklinks a.current {
125-
font-weight: bold;
126-
}
127-
128-
#page-local-amos-credits .language {
129-
border: 1px solid #eee;
130-
background-color: #f9f9f9;
131-
margin: 0em 2em 3em;
132-
padding: 0.5em;
133-
}
134-
135104
#page-local-amos-credits .langname {
136105
position: relative;
137106
left: -1em;
@@ -185,40 +154,6 @@
185154
padding: 0.5em;
186155
}
187156

188-
.path-local-amos .pagination {
189-
margin-left: auto;
190-
margin-right: auto;
191-
padding: 1em;
192-
text-align: center;
193-
font-size: 120%;
194-
}
195-
196-
.path-local-amos .pagination span {
197-
margin-left: 0.5em;
198-
margin-right: 0.5em;
199-
}
200-
201-
.path-local-amos .pagination .current {
202-
font-weight: bold;
203-
}
204-
205-
.path-local-amos .googlebranding {
206-
text-align: center;
207-
}
208-
209-
.path-local-amos .singlebutton.showclosed {
210-
text-align: center;
211-
margin: 20px auto;
212-
}
213-
214-
.path-local-amos .stashwrapper {
215-
margin: 0px 0px 1em 0px;
216-
}
217-
218-
.path-local-amos .stashwrapper {
219-
background-color: white;
220-
}
221-
222157
.path-local-amos .stashwrapper.mousein {
223158
background-color: #f7f7f7;
224159
}
@@ -228,30 +163,12 @@
228163
margin: 10px;
229164
}
230165

231-
.path-local-amos .stash h3 {
232-
margin: 0px 0px 0px 40px;
233-
}
234-
235-
.path-local-amos .stash div {
236-
margin-left: 40px;
237-
}
238-
239166
.path-local-amos .stash img.userpicture {
240167
position: absolute;
241168
top: 5px;
242169
left: 0px;
243170
}
244171

245-
.path-local-amos .stash .strings span,
246-
.path-local-amos .stash .languages span,
247-
.path-local-amos .stash .components span {
248-
font-style: italic;
249-
}
250-
251-
.path-local-amos .stashwrapper .actions {
252-
margin: 10px 0px 0px 40px;
253-
}
254-
255172
.path-local-amos .stashwrapper .actions .singlebutton,
256173
.path-local-amos .stashwrapper .actions .singlebutton form,
257174
.path-local-amos .stashwrapper .actions .singlebutton form div {

scss/translator.scss

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Strings translator.
2+
#page-local-amos-view #amostranslator {
3+
4+
// Undo right margin on help icons.
5+
.amosinfo .icon {
6+
margin-right: 0;
7+
}
8+
9+
.amosinfo {
10+
margin-bottom: 0.25rem;
11+
}
12+
13+
.amosoriginal, .amostranslation {
14+
flex: 1 1 auto;
15+
min-height: 3rem;
16+
border: 1px solid rgb(204,204,204);
17+
border-radius: 4px;
18+
padding: 5px;
19+
}
20+
}

styles.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)