rejetto forum
February 11, 2012, 01:32:40 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: This forum is free, you do NOT need to register to post. But you may.
PROBLEMS? QUESTIONS? CLICK HERE!
Fill the survey!
 
   Home   Help Search Login Register  
Pages: 1 ... 4 5 [6]
  Print  
Author Topic: next default template to build 261  (Read 9442 times)
0 Members and 1 Guest are viewing this topic.
Nestor
Occasional poster
*
Offline Offline

Posts: 4


View Profile
« Reply #75 on: June 27, 2010, 07:31:18 AM »

As I mentioned, this is not a problem for Spanish, I was only concerned about localization for other languages.
AFAIK, it's generally accepted by programmers that hardcoding strings makes localization more difficult, so it's not a good practice.

This is constructive criticism, I do appreciate the time and effort spent in this useful application, that's why I posted.
« Last Edit: June 27, 2010, 07:34:59 AM by Nestor » Logged
SilentPliz
Operator
Insane poster
*****
Offline Offline

France France

Posts: 1023


....... chut ! shh!


View Profile WWW
« Reply #76 on: June 27, 2010, 07:53:32 AM »

I agree with you.
Before we can use external languages files for HFS, it will must review some strings ... The B is not the most difficult to overcome, however.
« Last Edit: June 27, 2010, 07:57:13 AM by SilentPliz » Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11759


View Profile
« Reply #77 on: June 28, 2010, 01:27:32 PM »

ok, removed from next version (261)
Logged
Mars
Operator
Insane poster
*****
Offline Offline

France France

Posts: 1469



View Profile WWW
« Reply #78 on: June 30, 2010, 04:22:56 PM »

i think it is possible to change to

%total-size% return the unit  without 'B'  , in the same time we can modify  %item-size%

the delphi function must return only the value and the unit without the 'B'

Quote
function smartsize(size:int64):string;
begin
if size < 0 then result:='N/A'
else
  if size < 1 shl 10 then result:=format('%d ',[size])
  else
    if size < 1 shl 20 then result:=format('%f K',[size/(1 shl 10)])
    else
      if size < 1 shl 30 then result:=format('%f M',[size/(1 shl 20)])
      else result:=format('%f G',[size/(1 shl 30)])
end; // smartsize

<div id='folder-stats'>%number-folders% {.!folders.},  %number-files% {.!files.}, %total-size%{.!unit.}

then in the template it will possible to use as unit one of

[special:string]
unit=Byte
unit=Octet
unit=Octeto
unit=Байт
unit=バイト
unit=字节
unit=בייט

for other values we can change the template or the delphi code
vars:
'%total-out%' '%total-in%' '%total-size%'
'%diskfree%' '%item-size%' '%done%' '%total%'

macros:
'smart size'


others: 6 update

HRM_REPLY: if not data.fullDLlogged then add2log(format('Served %sB', [smartSize(conn.bytesSentLastItem)]), data);
HE_POST_END_FILE:
  if logUploadsChk.checked and (data.uploadFailed = '') then
    add2log(format('Fully uploaded -  %sB @ %d KB/s', [
      smartSize(conn.bytesPostedLastItem),
      calcAverageSpeed(conn.bytesPostedLastItem) ]), data);
HE_LAST_BYTE_DONE:
  if logFulldownloadsChk.checked
  and (data.downloadingWhat in [DW_FILE, DW_ARCHIVE]) then
    begin
    data.fullDLlogged:=TRUE;
    add2log(format('Fully downloaded - %sB @ %d KB/s - %s', [
      smartSize(conn.bytesSentLastItem),
      calcAverageSpeed(conn.bytesSentLastItem), url_]), data);
    end;

  sbarIdxs.totalOut:=addPanel( format('Total Out: %sB',[
    smartSize(outTotalOfs+srv.bytesSent)]) );
  sbarIdxs.totalIn:=addPanel( format('Total In: %sB',[
    smartSize(inTotalOfs+srv.bytesReceived)]) );

  if f.isFile() then
    result:=result+format(#13'Size: %s'#13'Downloads: %dB',
      [ smartsize(sizeofFile(f.resource)), f.DLcount ]);


in the template: 4 update
<div id='folder-stats'>%number-folders% {.!folders.},  %number-files% {.!files.}, %total-size%{.!unit.}

[+file]
<td>%item-size%{.!unit.}<td>%item-modified%<td>%item-dl-count%


[progress-upload-file]
{.if not|{.{.?only.} = down.}|{:
   <li> Uploading %total%{.!unit.} @ %speed-kb% KB/s
   <br /><span class='fn'>%filename%</span>

[progress-download-file]
{.if not|{.{.?only.} = up.}|{:
   <li> Downloading %total%{.!unit.}
   <br>Speed: %speed-kb% KB/s


now it's time to apply all of them to the build 261. Wink
Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11759


View Profile
« Reply #79 on: July 06, 2010, 06:14:17 AM »

i think we can live without the B in some of the places where it used to be there
Logged
Mars
Operator
Insane poster
*****
Offline Offline

France France

Posts: 1469



View Profile WWW
« Reply #80 on: July 06, 2010, 07:59:25 AM »

Quote
i think we can live without the B in some of the places where it used to be there

The "B" in the template will miss us less than you on the forum, even if it means going without something, for me, it will be the "B".

Do I have to set up a pool for this question? Cheesy Cheesy Cheesy Cheesy
 Wink
Logged
rejetto forum
« Reply #80 on: July 06, 2010, 07:59:25 AM »

Do you like this software? Consider even $2
 Logged
TSG
Operator
Insane poster
*****
Offline Offline

Australia Australia

Posts: 1916



View Profile WWW
« Reply #81 on: July 08, 2010, 02:13:33 AM »

I was thinking, if you want to include a HFS logo or something, so it doesn't look like its coming from purple land, and you don't want to host it on the server as an image, or embed it in the application.

You could use a base64 uri in css, this lets a user delete it for modification, it also is not actually hidden in HFS and used only for template purposes, keeps it editable. You could use this to add images to the interface also, if you wanted to make a really pro default template.

This does pose some problems, make sure you comment what it is, otherwise it just looks like a block of letters. It also does increase the CSS size, obviously, so make sure any base64 operations are at the bottom of the CSS file, so its the last thing to happen after the page generation. You can also do this to reduce the number of calls to the server. I don't like it from a designers point of view, I like to see the images on my hard drive, and I use sprites to get around the multiple call issue. But it is handy sometimes.

Something like this could also be used with the HFS icons, you could convert the windows icons to png24 then base64 them and feed that to the browser. If this isn't already how it works, I am not sure. Just trying to help, when I can.

A related article:
http://www.nczonline.net/blog/2010/07/06/data-uris-make-css-sprites-obsolete/

A base64 online encoder/decoder:
http://www.motobit.com/util/base64-decoder-encoder.asp

« Last Edit: July 08, 2010, 05:51:05 AM by TSG » Logged

rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11759


View Profile
« Reply #82 on: July 08, 2010, 10:24:44 AM »

interesting, it may be used for small images, like single pixel width gradients.
things like that should be like 1kb or so.
Logged
Phillip
Guest


Email
« Reply #83 on: September 08, 2010, 03:42:45 AM »

I tested it and it looks good.  I like the format, simple and to the point.
Logged
Pages: 1 ... 4 5 [6]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!


Google visited last this page February 06, 2012, 09:17:24 AM
anything