Hi, Ecaterina!
To improve translator's life, I suggest to add "Copy" button from
original label to the translation input, because it is easier to modify
existing text structure.
Following is proof of concept code shown for livetable with XWiki Users:
{{velocity}}
#set($columns = [ "first_name", "buttons" ,"trans" ])
#set($columnsProperties = {
"first_name" : { "type" : "none", "html": true,
"size" : 10,
"filterable" : false, "sortable": false, "displayName":
"Name"},
"buttons" : { "type" : "text", "size" : 10,
"filterable" : false,
"sortable": false , "displayName": "copy"},
"trans" : { "type" : "text", "size" : 10,
"filterable" : false ,
"sortable": false}
})
#set($options = {
"className":"XWiki.XWikiUsers",
"tagCloud" : false,
"rowCount": 10,
"maxPages" : 10
})
#livetable("xwikiusers" $columns $columnsProperties $options)
{{html clean="false"}}
<script language="JavaScript">
var origs, buttons, trans;
function copyOrig (i) {
var cont =origs[i].innerHTML.replace(/"/g,'"');
trans[i].innerHTML='<input value="'+cont+'"/>';
}
document.observe("xwiki:livetable:displayComplete", function(ev) {
origs=$$('.first_name');
buttons=$$('.buttons');
trans=$$('.trans');
for (i=0; i<origs.length; i++) {
buttons[i].innerHTML='<button
onclick="copyOrig('+i+');">Copy';
trans[i].innerHTML='<input/>';
}
});
</script>
{{/html}}
{{/velocity}}
Please add similar code to the class sheet code and feel free to improve
code design.
I'm not studying for a while, but looked at git project. After building
I got exception:
...
[ERROR] Failed to execute goal
org.xwiki.commons:xwiki-commons-tool-xar-plugin:5.0.1:verify
(default-verify) on project xwiki-application-l10n: There are errors in
the XAR XML files! -> [Help 1]
...
Thanks!
Valdis
Hi Valdis,
I've demanded your ssx on L10NCode.TranslationFileClassSheet20
and also made some changes on it, see
l10n.xwiki.org/xwiki/bin/view/L10N/StatusByLanguage?viewer=changes&rev1…
l10n.xwiki.org is using an old version and we should make the time
sometime to upgrade.
Hiding the panels is not the best solution and would be much nicer to
have a responsive skin, but until then your changes are most welcome.
Thank you.
Same for a lot of tables: they should be replaced with livetables.
A small question :) are you a student? We have a GSOC proposal idea
http://dev.xwiki.org/xwiki/bin/view/GoogleSummerOfCode/#HImprovel10n.xwiki.… but we
don't know yet if we are going to be accepted this year in the program. But would be
great to have someone working on it.
Regarding rights to commit on l10n. First of all we should package it
as an extension in the xwiki-contrib repo. This way would be so much
easier to make pull requests on it. But again, somebody needs to find
the time to do it.
Thomas, could you give an input on this?
Valdis thanks again for improving l10n,
Caty
On Thu, Feb 19, 2015 at 10:41 PM, Valdis Vītoliņš
<valdis.vitolins(a)odo.lv> wrote:
To manage translations better I've updated
http://l10n.xwiki.org/xwiki/bin/view/L10N/StatusByLanguage
page which
generates links to translation pages.
I added JavaScript sorting, which seems to work only
alphabetically :-/
When I work on laptop, I haven't enough screen to fully see
translation
tables, therefore I added XWiki.StyleSheetExtension with
dynamic style
which hides panel on smaller width.
@media (max-width: 1366px) {
#leftPanels, #rightPanels {
display: none;
}
#contentcolumn div.main.layoutsubsection {
margin: 0 !important;
}
div#contentcolumn div.main.layoutsubsection {
padding: 0 !important;
}
}
Can anybody with appropriate rights add and include similar
object to
Translation class
http://l10n.xwiki.org/xwiki/bin/view/L10NCode/TranslationFileClassSheet20
Also. And maybe add similar JavaSript sorting for translation
tables
also? (Or somebody could give modify permissions for valdisvi
user to
this class.)
It would improve usability a lot.
Thanks!
Valdis
I'm updating XWiki translations in
http://l10n.xwiki.org/ and after
resource redesign I wonder where should I start.
Can you provide some list of description/priorities for all
XWiki
platforms and files, which should be translated
first to
cover needs of
the most usual XWiki users.
Thanks!
Valdis
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs