Localise browser "Index of" text
svn path=/trunk/netsurf/; revision=10645
This commit is contained in:
parent
18ffa91361
commit
8940cc18b1
|
@ -653,6 +653,7 @@ EncodingUnk:Unbekannt
|
|||
|
||||
# Directory browser
|
||||
#
|
||||
FileIndex:Index of %s
|
||||
FileParent:^ Up to parent directory
|
||||
FileDirectory:Directory
|
||||
FileName:Name
|
||||
|
|
|
@ -657,6 +657,7 @@ EncodingUnk:Unknown
|
|||
|
||||
# Directory browser
|
||||
#
|
||||
FileIndex:Index of %s
|
||||
FileParent:^ Up to parent directory
|
||||
FileDirectory:Directory
|
||||
FileName:Name
|
||||
|
|
|
@ -653,6 +653,7 @@ EncodingUnk:Inconnu
|
|||
|
||||
# Directory browser
|
||||
#
|
||||
FileIndex:Index of %s
|
||||
FileParent:^ Up to parent directory
|
||||
FileDirectory:Directory
|
||||
FileName:Name
|
||||
|
|
|
@ -658,6 +658,7 @@ EncodingUnk:Sconosciuto
|
|||
|
||||
# Directory browser
|
||||
#
|
||||
FileIndex:Index of %s
|
||||
FileParent:^ Up to parent directory
|
||||
FileDirectory:Directory
|
||||
FileName:Name
|
||||
|
|
|
@ -653,6 +653,7 @@ EncodingUnk:Unknown
|
|||
|
||||
# Directory browser
|
||||
#
|
||||
FileIndex:Index of %s
|
||||
FileParent:^ Up to parent directory
|
||||
FileDirectory:Directory
|
||||
FileName:Name
|
||||
|
|
|
@ -176,13 +176,29 @@ bool dirlist_generate_hide_columns(int flags, char *buffer, int buffer_length)
|
|||
|
||||
bool dirlist_generate_title(char *title, char *buffer, int buffer_length)
|
||||
{
|
||||
int error = snprintf(buffer, buffer_length,
|
||||
int error = 0;
|
||||
int index_title_length = strlen(title) +
|
||||
strlen(messages_get("FileIndex"));
|
||||
char *index_title = malloc(index_title_length);
|
||||
|
||||
if(index_title == NULL)
|
||||
/* Title buffer allocation error */
|
||||
return false;
|
||||
|
||||
error = snprintf(index_title, index_title_length,
|
||||
messages_get("FileIndex"),
|
||||
title);
|
||||
if (error < 0 || error >= index_title_length)
|
||||
/* Error or buffer too small */
|
||||
return false;
|
||||
|
||||
error = snprintf(buffer, buffer_length,
|
||||
"</style>\n"
|
||||
"<title>Index of %s</title>\n"
|
||||
"<title>%s</title>\n"
|
||||
"</head>\n"
|
||||
"<body>\n"
|
||||
"<h1>Index of %s</h1>\n",
|
||||
title, title);
|
||||
"<h1>%s</h1>\n",
|
||||
index_title, index_title);
|
||||
if (error < 0 || error >= buffer_length)
|
||||
/* Error or buffer too small */
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue