Author |
Topic |
|
Prinz
Senior Member
Germany
1522 Posts |
Posted - 25 Apr 2011 : 00:48:27
|
I just tested it. You can use unicode for all translated strings. This works for both html code and tooltips.
If you make a utility this should make things a more simple. |
|
|
JDommi
Administrator
Germany
4653 Posts |
Posted - 25 Apr 2011 : 00:54:46
|
Yes, I have thought of typing your translation strings and a tool replaces special chars in these strings with the fitting unicode. Maybe we could use a skeleton for. English original (as normal txt file) and the user's translation that will be saved into the correct subdir. Let it be understood: editable... |
In order to achieve what is possible, you have to try the impossible over and over again. Hermann Hesse |
|
|
JDommi
Administrator
Germany
4653 Posts |
Posted - 25 Apr 2011 : 10:23:31
|
I think we don't need a tool for it even if the locale text doesn't contain the unicode chars. What about automatic conversion to unicode by a function?
<script>
function ucode(b) {
var c= '';
for(i=0; i<b.length; i++){
if(b.charCodeAt(i)>127){ c += '#' + b.charCodeAt(i) + ';'; }else{ c += b.charAt(i); }
}
return(c);
}
</script> This way you only have to usedocument.write(ucode(text)); |
In order to achieve what is possible, you have to try the impossible over and over again. Hermann Hesse |
Edited by - JDommi on 25 Apr 2011 10:55:03 |
|
|
Prinz
Senior Member
Germany
1522 Posts |
Posted - 25 Apr 2011 : 15:57:35
|
Slow the loading of the page even more down??? I don't think so...
Everybody who likes to translate can use for example that site to convert the special chars: http://0xcc.net/jsescape/ |
|
|
Prinz
Senior Member
Germany
1522 Posts |
Posted - 25 Apr 2011 : 18:01:15
|
- Changed many time-consuming things to background tasks (Adding additional Covers/Fanart, Studio pics, aka Titles, Certification, Awards, Tabs, Accordion, ...)
This should increase the loading speed, because all these things will be added after the site is already usable.
http://www.mediafire.com/?8g31hncxe05wj51 |
|
|
Prinz
Senior Member
Germany
1522 Posts |
Posted - 25 Apr 2011 : 18:40:39
|
- Changed the Table layout for the Actors-listing on the Main Movie Card to fixed
This improves the loading speed of some movies significantly! I had 1 Movie before (2012) that coursed for about 3-5 second a waiting cursor for the entire XMM App, now it's loaded as fast as the other movies.
http://www.mediafire.com/?chcqte9848b57tc |
|
|
Prinz
Senior Member
Germany
1522 Posts |
Posted - 25 Apr 2011 : 19:03:38
|
Now i found a TV show were all actor names are now in the wrong place.
Internet Explorer |
|
|
Prinz
Senior Member
Germany
1522 Posts |
|
JDommi
Administrator
Germany
4653 Posts |
Posted - 25 Apr 2011 : 19:31:52
|
Help needed for javascript function for Original/Remake:
What's the character to split lines from a Memofield? Normal \n doesn't work...
<html>
<head>
<title>TEST</title>
</head>
<body>
<script>
var remakeinfo = '_MOVIE_CHARACTERINFO_';
var remakeinfo = 'Original: Der Tag an dem die Erde still stand [1951]|819'+'\n'+'Remake: Der Tag an dem die Erde still stand [2008]|'+'\n'+'Remake: Der Tag an dem die Erde still stand [2008]|1123';
var remakeinfo = 'Remake: Der Tag an dem die Erde still stand [2008]|1123';
var remake = '';
var myArray = remakeinfo.split('\n');
for (var i = 0;i < myArray.length;i++) {
remake = myArray[i];
if (remake.length >> 0) {
var outp = '';
if (remake.indexOf('Original: ') == -1 && i == 0) {
document.write('ORIGINAL!!!');
document.write('<br><br>Remakes:');
var orig = -1;
} else {
if (i == 0) {
document.write('REMAKE!!!');
document.write('Original:');
}
var orig = 0;
}
remake = remake.substring(remake.indexOf(':')+1,remake.length);
var sTitle = remake.substring(0,remake.indexOf('|'));
var sID = remake.substring(remake.indexOf('|')+1,remake.length);
if (sID.length >> 0) {
outp = outp + '<br><font color="#FFFFFF"><a href="" onClick="window.external.COLLECTION_FINDMOVIE(';
outp = outp + '' + sID + '';
outp = outp + ');return false;"><b> ' + sTitle + '</b></a></font><br>';
} else {
outp = outp + sTitle;
}
document.write(''+outp);
if (orig == 0 && i == 0 && myArray.length >> 1) {
document.write('<br>Other Remakes:<br>');
}
}
}
</script>
</body>
</html> |
In order to achieve what is possible, you have to try the impossible over and over again. Hermann Hesse |
|
|
Prinz
Senior Member
Germany
1522 Posts |
Posted - 25 Apr 2011 : 19:49:53
|
var remakeinfo = 'Original: Der Tag an dem die Erde still stand [1951]|819'+'\n'+'Remake: Der Tag an dem die Erde still stand [2008]|'+'\n'+'Remake: Der Tag an dem die Erde still stand [2008]|1123'; var remakeinfo = 'Remake: Der Tag an dem die Erde still stand [2008]|1123'; var remake = ''; var myArray = remakeinfo.split('\n');
There no \n in your string... You replace the content of the same variable with a string without a \n , so nothing can be split of course. |
|
|
JDommi
Administrator
Germany
4653 Posts |
Posted - 25 Apr 2011 : 19:55:37
|
Yes, but how can I split the info given in _MOVIE_CHARACTERINFO_? The code above works already. Except the splitting of that variable.
The multiple assignment is only a test for the different possibilities! |
In order to achieve what is possible, you have to try the impossible over and over again. Hermann Hesse |
Edited by - JDommi on 25 Apr 2011 19:56:37 |
|
|
Prinz
Senior Member
Germany
1522 Posts |
Posted - 25 Apr 2011 : 20:06:38
|
quote: Originally posted by JDommi
Yes, but how can I split the info given in _MOVIE_CHARACTERINFO_?
var remakeinfo = '_MOVIE_CHARACTERINFO_';
If that field uses real linebreaks (and/or illegal unescaped special chars) you can't set the Variable this way, because this isn't allowed in the declaration of a Variable and the execution of the javascript code will stop at this point.
I didn't look at that variable, because it's useless and i don't know if it will exist in future versions because of that. |
|
|
JDommi
Administrator
Germany
4653 Posts |
Posted - 25 Apr 2011 : 21:00:16
|
Finally I got it!
_MOVIE_CHARACTERINFO_ is misused as info for original/remake The red colored lines can be replaced by code to show the pics for Original or Remake!
Data has to be filled in manually: Original: Der Tag an dem die Erde still stand [1951]|819# Remake: Der Tag an dem die Erde still stand [2008]|1123# Remake: text|movieid# or Remake: text|#
Original only has to be filled if the actual movie is a remake. The number behind | is the MovieID if it's in the database otherwise leave it blank. # is at the end of each line. Multiple remakes are allowed.
<a id="reminfo" style="display:none;">_MOVIE_CHARACTERINFO_</a>
<script type=text/javascript>
var remakeinfo = $('#reminfo').text();
var remake = '';
var myArray = remakeinfo.split('#');
for (var i = 0;i < myArray.length;i++) {
remake = myArray[i];
if (remake.length >> 0) {
var outp = '';
if (remake.indexOf('Original: ') == -1 && i == 0) {
document.write('ORIGINAL!!!<br><br>');
document.write('<br><br>Remakes:');
var orig = -1;
} else {
if (i == 0) {
document.write('REMAKE!!!<br><br>');
document.write('Original:');
}
var orig = 0;
}
remake = remake.substring(remake.indexOf(':')+1,remake.length);
var sTitle = remake.substring(0,remake.indexOf('|'));
var sID = remake.substring(remake.indexOf('|')+1,remake.length);
if (sID.length >> 0) {
outp = outp + '<br><font color="#FFFFFF"><a href="" onClick="window.external.COLLECTION_FINDMOVIE(';
outp = outp + '' + sID + '';
outp = outp + ');return false;"><b> ' + sTitle + '</b></a></font><br>';
} else {
outp = outp + sTitle;
}
document.write(''+outp);
if (orig == 0 && i == 0 && myArray.length >> 1) {
document.write('<br>Other Remakes:<br>');
}
}
}
</script> |
In order to achieve what is possible, you have to try the impossible over and over again. Hermann Hesse |
Edited by - JDommi on 25 Apr 2011 21:07:47 |
|
|
Prinz
Senior Member
Germany
1522 Posts |
Posted - 25 Apr 2011 : 21:40:32
|
Another loading speed improvement.
- Removed a now unnecessary workaround for the wrong Image sizes (Replaced with a more correct Workaround)
http://www.mediafire.com/?yonh21gnxo5oisi |
|
|
Prinz
Senior Member
Germany
1522 Posts |
Posted - 26 Apr 2011 : 11:31:59
|
- replaced old with new workaround for image resize on Actors Card (Movies in Database) and for the Boxset Card - changed more things like genres to background processes
http://www.mediafire.com/?if0rhlz2lu9425g |
|
|
Prinz
Senior Member
Germany
1522 Posts |
|
JDommi
Administrator
Germany
4653 Posts |
Posted - 26 Apr 2011 : 18:39:06
|
There is a little defective appearance on the ratings bar: if you scroll down until the bar isn't seen anymore and scroll back again then the colorfill is empty. |
In order to achieve what is possible, you have to try the impossible over and over again. Hermann Hesse |
|
|
Prinz
Senior Member
Germany
1522 Posts |
Posted - 26 Apr 2011 : 19:06:28
|
Not on my PC. I did that already dozened of times... Sounds like a rendering bug on your PC (IE-Version...) |
|
|
JDommi
Administrator
Germany
4653 Posts |
Posted - 26 Apr 2011 : 19:16:59
|
IE 8.0.6001.18702 on XP-Pro SP3 |
In order to achieve what is possible, you have to try the impossible over and over again. Hermann Hesse |
|
|
Prinz
Senior Member
Germany
1522 Posts |
Posted - 26 Apr 2011 : 19:25:22
|
Exactly this combination IE8 + XP SP3 has a few DXImageTransform.Microsoft.gradient bugs... IE8 especially has a few problems/bugs with this function... sorry can't do anything about it...
And I can't test it because here everything works. IE9 + Win7 x64 |
|
|
Topic |
|
|