[project @ 2004-02-27 17:45:19 by bursa]

Move English text to Messages file for translation.

svn path=/import/netsurf/; revision=576
This commit is contained in:
James Bursa 2004-02-27 17:45:19 +00:00
parent 13787963e2
commit 7f68e012cc
13 changed files with 114 additions and 35 deletions

View File

@ -1,5 +1,4 @@
# English messages for NetSurf # English messages for NetSurf
#Version:0.01
# Menus # Menus
NetSurf:NetSurf NetSurf:NetSurf
@ -48,3 +47,33 @@ ErrorPage:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/T
InvalidURL:The address <em>%s</em> could not be understood. InvalidURL:The address <em>%s</em> could not be understood.
NoMemory:NetSurf is running out of memory. Please free some memory and try again. NoMemory:NetSurf is running out of memory. Please free some memory and try again.
Loading:Opening page...
RecPercent:Received %lu of %lu bytes (%u%%)
Received:Received %lu bytes
Converting:Converting %lu bytes
BadRedirect:Bad redirect URL
FetchFailed:Unable to fetch document
Complete:Page complete (%gs)
Redirecting:Redirecting...
Processing:Processing document
Formatting:Formatting document
FetchObjs:Loading %u objects
FetchObjs2:Loading %u objects: %s
Done:Document done
FetchStyle:Loading %u stylesheets
FetchStyle2:Loading %u stylesheets: %s
NotCSS:Warning: stylesheet is not CSS
BadObject:Warning: bad object type
ObjError:Error loading object: %s
DrawTitle:Draw image (%lux%lu, %lu bytes)
GIFTitle:GIF image (%lux%lu)
JPEGTitle:JPEG image (%ux%u, %lu bytes)
PNGImage:PNG image (%lux%lu)
SpriteTitle:Sprite image (%lux%lu, %lu bytes)
SelectMenu:Select
SaveSource:Source
SaveDraw:Webpage

View File

@ -1,5 +1,4 @@
# French messages for NetSurf # French messages for NetSurf
#Version:0.01
# Menus # Menus
NetSurf:NetSurf NetSurf:NetSurf
@ -48,3 +47,33 @@ ErrorPage:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/T
InvalidURL:L'adresse <em>%s</em> est incomprise. InvalidURL:L'adresse <em>%s</em> est incomprise.
NoMemory:NetSurf a besoin de plus de mémoire. Veuillez libérer de la mémoire et réessayer. NoMemory:NetSurf a besoin de plus de mémoire. Veuillez libérer de la mémoire et réessayer.
Loading:Opening page...
RecPercent:Received %lu of %lu bytes (%u%%)
Received:Received %lu bytes
Converting:Converting %lu bytes
BadRedirect:Bad redirect URL
FetchFailed:Unable to fetch document
Complete:Page complete (%gs)
Redirecting:Redirecting...
Processing:Processing document
Formatting:Formatting document
FetchObjs:Loading %u objects
FetchObjs2:Loading %u objects: %s
Done:Document done
FetchStyle:Loading %u stylesheets
FetchStyle2:Loading %u stylesheets: %s
NotCSS:Warning: stylesheet is not CSS
BadObject:Warning: bad object type
ObjError:Error loading object: %s
DrawTitle:Draw image (%lux%lu, %lu bytes)
GIFTitle:GIF image (%lux%lu)
JPEGTitle:JPEG image (%ux%u, %lu bytes)
PNGImage:PNG image (%lux%lu)
SpriteTitle:Sprite image (%lux%lu, %lu bytes)
SelectMenu:Select
SaveSource:Source
SaveDraw:Webpage

View File

@ -42,6 +42,7 @@
#endif #endif
#endif #endif
#include "netsurf/utils/log.h" #include "netsurf/utils/log.h"
#include "netsurf/utils/messages.h"
#include "netsurf/utils/utils.h" #include "netsurf/utils/utils.h"
@ -190,7 +191,7 @@ struct content * content_create(char *url)
c->size = sizeof(struct content); c->size = sizeof(struct content);
c->fetch = 0; c->fetch = 0;
c->mime_type = 0; c->mime_type = 0;
strcpy(c->status_message, "Loading"); strcpy(c->status_message, messages_get("Loading"));
user_sentinel = xcalloc(1, sizeof(*user_sentinel)); user_sentinel = xcalloc(1, sizeof(*user_sentinel));
user_sentinel->callback = 0; user_sentinel->callback = 0;
user_sentinel->p1 = user_sentinel->p2 = 0; user_sentinel->p1 = user_sentinel->p2 = 0;

View File

@ -170,18 +170,23 @@ void fetchcache_callback(fetch_msg msg, void *p, char *data, unsigned long size)
LOG(("FETCH_DATA")); LOG(("FETCH_DATA"));
c->fetch_size += size; c->fetch_size += size;
if (c->total_size) if (c->total_size)
sprintf(c->status_message, "Received %lu of %lu bytes (%u%%)", sprintf(c->status_message,
messages_get("RecPercent"),
c->fetch_size, c->total_size, c->fetch_size, c->total_size,
(unsigned int) (c->fetch_size * 100.0 / c->total_size)); (unsigned int) (c->fetch_size *
100.0 / c->total_size));
else else
sprintf(c->status_message, "Received %lu bytes", c->fetch_size); sprintf(c->status_message,
messages_get("Received"),
c->fetch_size);
content_broadcast(c, CONTENT_MSG_STATUS, 0); content_broadcast(c, CONTENT_MSG_STATUS, 0);
content_process_data(c, data, size); content_process_data(c, data, size);
break; break;
case FETCH_FINISHED: case FETCH_FINISHED:
LOG(("FETCH_FINISHED")); LOG(("FETCH_FINISHED"));
sprintf(c->status_message, "Converting %lu bytes", c->fetch_size); sprintf(c->status_message, messages_get("Converting"),
c->fetch_size);
c->fetch = 0; c->fetch = 0;
content_broadcast(c, CONTENT_MSG_STATUS, 0); content_broadcast(c, CONTENT_MSG_STATUS, 0);
content_convert(c, c->width, c->height); content_convert(c, c->width, c->height);
@ -211,7 +216,8 @@ void fetchcache_callback(fetch_msg msg, void *p, char *data, unsigned long size)
content_broadcast(c, CONTENT_MSG_REDIRECT, url); content_broadcast(c, CONTENT_MSG_REDIRECT, url);
xfree(url); xfree(url);
} else { } else {
content_broadcast(c, CONTENT_MSG_ERROR, "Bad redirect"); content_broadcast(c, CONTENT_MSG_ERROR,
messages_get("BadRedirect"));
} }
if (c->cache) if (c->cache)
cache_destroy(c); cache_destroy(c);

View File

@ -149,7 +149,7 @@ void browser_window_go_post(struct browser_window *bw, const char *url,
browser_window_stop(bw); browser_window_stop(bw);
browser_window_set_status(bw, "Opening page..."); browser_window_set_status(bw, messages_get("Loading"));
bw->history_add = history_add; bw->history_add = history_add;
bw->time0 = clock(); bw->time0 = clock();
c = fetchcache(url, 0, c = fetchcache(url, 0,
@ -159,7 +159,7 @@ void browser_window_go_post(struct browser_window *bw, const char *url,
post_urlenc, post_multipart, post_urlenc, post_multipart,
true); true);
if (!c) { if (!c) {
browser_window_set_status(bw, "Unable to fetch document"); browser_window_set_status(bw, messages_get("FetchFailed"));
return; return;
} }
bw->loading_content = c; bw->loading_content = c;
@ -230,7 +230,7 @@ void browser_window_callback(content_msg msg, struct content *c,
browser_window_update(bw, false); browser_window_update(bw, false);
content_reshape_instance(c, bw, 0, 0, 0, content_reshape_instance(c, bw, 0, 0, 0,
&bw->current_content_state); &bw->current_content_state);
sprintf(status, "Page complete (%gs)", sprintf(status, messages_get("Complete"),
((float) (clock() - bw->time0)) / ((float) (clock() - bw->time0)) /
CLOCKS_PER_SEC); CLOCKS_PER_SEC);
browser_window_set_status(bw, status); browser_window_set_status(bw, status);
@ -253,7 +253,8 @@ void browser_window_callback(content_msg msg, struct content *c,
case CONTENT_MSG_REDIRECT: case CONTENT_MSG_REDIRECT:
bw->loading_content = 0; bw->loading_content = 0;
browser_window_set_status(bw, "Redirecting"); browser_window_set_status(bw,
messages_get("Redirecting"));
/* error actually holds the new URL */ /* error actually holds the new URL */
browser_window_go(bw, error); browser_window_go(bw, error);
break; break;

View File

@ -23,6 +23,7 @@
#include "netsurf/render/html.h" #include "netsurf/render/html.h"
#include "netsurf/render/layout.h" #include "netsurf/render/layout.h"
#include "netsurf/utils/utils.h" #include "netsurf/utils/utils.h"
#include "netsurf/utils/messages.h"
#include "netsurf/utils/log.h" #include "netsurf/utils/log.h"
#define CHUNK 4096 #define CHUNK 4096
@ -161,7 +162,7 @@ int html_convert(struct content *c, unsigned int width, unsigned int height)
/* convert xml tree to box tree */ /* convert xml tree to box tree */
LOG(("XML to box")); LOG(("XML to box"));
sprintf(c->status_message, "Processing document"); sprintf(c->status_message, messages_get("Processing"));
content_broadcast(c, CONTENT_MSG_STATUS, 0); content_broadcast(c, CONTENT_MSG_STATUS, 0);
xml_to_box(html, c); xml_to_box(html, c);
/*box_dump(c->data.html.layout->children, 0);*/ /*box_dump(c->data.html.layout->children, 0);*/
@ -170,7 +171,7 @@ int html_convert(struct content *c, unsigned int width, unsigned int height)
xmlFreeDoc(document); xmlFreeDoc(document);
/* layout the box tree */ /* layout the box tree */
sprintf(c->status_message, "Formatting document"); sprintf(c->status_message, messages_get("Formatting"));
content_broadcast(c, CONTENT_MSG_STATUS, 0); content_broadcast(c, CONTENT_MSG_STATUS, 0);
LOG(("Layout document")); LOG(("Layout document"));
layout_document(c->data.html.layout->children, width); layout_document(c->data.html.layout->children, width);
@ -181,10 +182,11 @@ int html_convert(struct content *c, unsigned int width, unsigned int height)
if (c->active == 0) { if (c->active == 0) {
c->status = CONTENT_STATUS_DONE; c->status = CONTENT_STATUS_DONE;
sprintf(c->status_message, "Document done"); sprintf(c->status_message, messages_get("Done"));
} else { } else {
c->status = CONTENT_STATUS_READY; c->status = CONTENT_STATUS_READY;
sprintf(c->status_message, "Fetching %u objects", c->active); sprintf(c->status_message, messages_get("FetchObjs"),
c->active);
} }
return 0; return 0;
@ -393,7 +395,8 @@ void html_find_stylesheets(struct content *c, xmlNode *head)
/* complete the fetches */ /* complete the fetches */
while (c->active != 0) { while (c->active != 0) {
if (c->active != last_active) { if (c->active != last_active) {
sprintf(c->status_message, "Loading %u stylesheets", c->active); sprintf(c->status_message, messages_get("FetchStyle"),
c->active);
content_broadcast(c, CONTENT_MSG_STATUS, 0); content_broadcast(c, CONTENT_MSG_STATUS, 0);
last_active = c->active; last_active = c->active;
} }
@ -424,7 +427,7 @@ void html_convert_css_callback(content_msg msg, struct content *css,
c->data.html.stylesheet_content[i] = 0; c->data.html.stylesheet_content[i] = 0;
c->active--; c->active--;
c->error = 1; c->error = 1;
sprintf(c->status_message, "Warning: stylesheet is not CSS"); sprintf(c->status_message, messages_get("NotCSS"));
content_broadcast(c, CONTENT_MSG_STATUS, 0); content_broadcast(c, CONTENT_MSG_STATUS, 0);
content_remove_user(css, html_convert_css_callback, c, (void*)i); content_remove_user(css, html_convert_css_callback, c, (void*)i);
} }
@ -445,7 +448,7 @@ void html_convert_css_callback(content_msg msg, struct content *css,
break; break;
case CONTENT_MSG_STATUS: case CONTENT_MSG_STATUS:
snprintf(c->status_message, 80, "Loading %u stylesheets: %s", snprintf(c->status_message, 80, messages_get("FetchStyle2"),
c->active, css->status_message); c->active, css->status_message);
content_broadcast(c, CONTENT_MSG_STATUS, 0); content_broadcast(c, CONTENT_MSG_STATUS, 0);
break; break;
@ -550,7 +553,7 @@ void html_object_callback(content_msg msg, struct content *object,
c->data.html.object[i].content = 0; c->data.html.object[i].content = 0;
c->active--; c->active--;
c->error = 1; c->error = 1;
sprintf(c->status_message, "Warning: bad object type"); sprintf(c->status_message, messages_get("BadObject"));
content_broadcast(c, CONTENT_MSG_STATUS, 0); content_broadcast(c, CONTENT_MSG_STATUS, 0);
content_remove_user(object, html_object_callback, c, (void*)i); content_remove_user(object, html_object_callback, c, (void*)i);
break; break;
@ -589,12 +592,13 @@ void html_object_callback(content_msg msg, struct content *object,
c->data.html.object[i].content = 0; c->data.html.object[i].content = 0;
c->active--; c->active--;
c->error = 1; c->error = 1;
snprintf(c->status_message, 80, "Image error: %s", error); snprintf(c->status_message, 80,
messages_get("ObjError"), error);
content_broadcast(c, CONTENT_MSG_STATUS, 0); content_broadcast(c, CONTENT_MSG_STATUS, 0);
break; break;
case CONTENT_MSG_STATUS: case CONTENT_MSG_STATUS:
snprintf(c->status_message, 80, "Loading %i objects: %s", snprintf(c->status_message, 80, messages_get("FetchObjs2"),
c->active, object->status_message); c->active, object->status_message);
/* content_broadcast(c, CONTENT_MSG_STATUS, 0); */ /* content_broadcast(c, CONTENT_MSG_STATUS, 0); */
break; break;
@ -641,11 +645,12 @@ void html_object_callback(content_msg msg, struct content *object,
/* all objects have arrived */ /* all objects have arrived */
content_reformat(c, c->available_width, 0); content_reformat(c, c->available_width, 0);
c->status = CONTENT_STATUS_DONE; c->status = CONTENT_STATUS_DONE;
sprintf(c->status_message, "Document done"); sprintf(c->status_message, messages_get("Done"));
content_broadcast(c, CONTENT_MSG_DONE, 0); content_broadcast(c, CONTENT_MSG_DONE, 0);
} }
if (c->status == CONTENT_STATUS_READY) if (c->status == CONTENT_STATUS_READY)
sprintf(c->status_message, "Loading %i objects", c->active); sprintf(c->status_message, messages_get("FetchObjs"),
c->active);
} }

View File

@ -12,6 +12,7 @@
#include "netsurf/content/content.h" #include "netsurf/content/content.h"
#include "netsurf/riscos/draw.h" #include "netsurf/riscos/draw.h"
#include "netsurf/utils/utils.h" #include "netsurf/utils/utils.h"
#include "netsurf/utils/messages.h"
#include "netsurf/utils/log.h" #include "netsurf/utils/log.h"
#include "oslib/drawfile.h" #include "oslib/drawfile.h"
@ -64,7 +65,7 @@ int draw_convert(struct content *c, unsigned int width, unsigned int height)
c->data.draw.x0 = bbox->x0 / 2; c->data.draw.x0 = bbox->x0 / 2;
c->data.draw.y0 = bbox->y0 / 2; c->data.draw.y0 = bbox->y0 / 2;
c->title = xcalloc(100, 1); c->title = xcalloc(100, 1);
sprintf(c->title, "Draw image (%lux%lu, %lu bytes)", c->width, sprintf(c->title, messages_get("DrawTitle"), c->width,
c->height, c->data.draw.length); c->height, c->data.draw.length);
c->status = CONTENT_STATUS_DONE; c->status = CONTENT_STATUS_DONE;
xfree(matrix); xfree(matrix);

View File

@ -19,6 +19,7 @@
#include "netsurf/content/content.h" #include "netsurf/content/content.h"
#include "netsurf/riscos/gif.h" #include "netsurf/riscos/gif.h"
#include "netsurf/utils/log.h" #include "netsurf/utils/log.h"
#include "netsurf/utils/messages.h"
#include "netsurf/utils/utils.h" #include "netsurf/utils/utils.h"
#ifdef WITH_GIF #ifdef WITH_GIF
@ -113,7 +114,7 @@ int nsgif_convert(struct content *c, unsigned int iwidth, unsigned int iheight)
memset(mask, 255, (unsigned int)(header->mask - header->image)); memset(mask, 255, (unsigned int)(header->mask - header->image));
c->title = xcalloc(100, sizeof(char)); c->title = xcalloc(100, sizeof(char));
sprintf(c->title, "GIF image (%lux%lu)", c->width, c->height); sprintf(c->title, messages_get("GIFTitle"), c->width, c->height);
c->status = CONTENT_STATUS_DONE; c->status = CONTENT_STATUS_DONE;
/* xosspriteop_save_sprite_file(osspriteop_USER_AREA, /* xosspriteop_save_sprite_file(osspriteop_USER_AREA,

View File

@ -708,7 +708,8 @@ void gui_gadget_combo(struct browser_window* bw, struct form_control* g, unsigne
combo_menu = xcalloc(1, wimp_SIZEOF_MENU(count)); combo_menu = xcalloc(1, wimp_SIZEOF_MENU(count));
combo_menu->title_data.indirected_text.text = "Select"; combo_menu->title_data.indirected_text.text =
messages_get("SelectMenu");
combo_menu->title_fg = wimp_COLOUR_BLACK; combo_menu->title_fg = wimp_COLOUR_BLACK;
combo_menu->title_bg = wimp_COLOUR_LIGHT_GREY; combo_menu->title_bg = wimp_COLOUR_LIGHT_GREY;
combo_menu->work_fg = wimp_COLOUR_BLACK; combo_menu->work_fg = wimp_COLOUR_BLACK;

View File

@ -22,6 +22,7 @@
#include "netsurf/desktop/gui.h" #include "netsurf/desktop/gui.h"
#include "netsurf/riscos/jpeg.h" #include "netsurf/riscos/jpeg.h"
#include "netsurf/utils/log.h" #include "netsurf/utils/log.h"
#include "netsurf/utils/messages.h"
#include "netsurf/utils/utils.h" #include "netsurf/utils/utils.h"
/** /**
@ -166,7 +167,7 @@ int nsjpeg_convert(struct content *c, unsigned int width, unsigned int height)
c->width = w; c->width = w;
c->height = h; c->height = h;
c->title = xcalloc(100, 1); c->title = xcalloc(100, 1);
sprintf(c->title, "JPEG image (%ux%u, %lu bytes)", w, h, c->data.jpeg.length); sprintf(c->title, messages_get("JPEGTitle"), w, h, c->data.jpeg.length);
c->status = CONTENT_STATUS_DONE; c->status = CONTENT_STATUS_DONE;
return 0; return 0;
} }

View File

@ -297,7 +297,8 @@ void ro_gui_menu_warning(wimp_message_menu_warning *warning)
ro_gui_set_icon_string(dialog_saveas, ro_gui_set_icon_string(dialog_saveas,
ICON_SAVE_ICON, "file_aff"); ICON_SAVE_ICON, "file_aff");
ro_gui_set_icon_string(dialog_saveas, ro_gui_set_icon_string(dialog_saveas,
ICON_SAVE_PATH, "Webpage"); ICON_SAVE_PATH,
messages_get("SaveDraw"));
break; break;
case -1: case -1:
@ -306,7 +307,8 @@ void ro_gui_menu_warning(wimp_message_menu_warning *warning)
ro_gui_set_icon_string(dialog_saveas, ro_gui_set_icon_string(dialog_saveas,
ICON_SAVE_ICON, "file_faf"); ICON_SAVE_ICON, "file_faf");
ro_gui_set_icon_string(dialog_saveas, ro_gui_set_icon_string(dialog_saveas,
ICON_SAVE_PATH, "Source"); ICON_SAVE_PATH,
messages_get("SaveSource"));
break; break;
} }

View File

@ -19,6 +19,7 @@
#include "netsurf/content/content.h" #include "netsurf/content/content.h"
#include "netsurf/riscos/png.h" #include "netsurf/riscos/png.h"
#include "netsurf/utils/log.h" #include "netsurf/utils/log.h"
#include "netsurf/utils/messages.h"
#include "netsurf/utils/utils.h" #include "netsurf/utils/utils.h"
#ifdef WITH_PNG #ifdef WITH_PNG
@ -346,7 +347,7 @@ int nspng_convert(struct content *c, unsigned int width, unsigned int height)
png_destroy_read_struct(&c->data.png.png, &c->data.png.info, 0); png_destroy_read_struct(&c->data.png.png, &c->data.png.info, 0);
c->title = xcalloc(100, 1); c->title = xcalloc(100, 1);
sprintf(c->title, "PNG image (%lux%lu)", c->width, c->height); sprintf(c->title, messages_get("PNGTitle"), c->width, c->height);
c->status = CONTENT_STATUS_DONE; c->status = CONTENT_STATUS_DONE;
return 0; return 0;
} }

View File

@ -8,13 +8,14 @@
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include "oslib/colourtrans.h"
#include "oslib/osspriteop.h"
#include "netsurf/utils/config.h" #include "netsurf/utils/config.h"
#include "netsurf/content/content.h" #include "netsurf/content/content.h"
#include "netsurf/riscos/sprite.h" #include "netsurf/riscos/sprite.h"
#include "netsurf/utils/utils.h"
#include "netsurf/utils/log.h" #include "netsurf/utils/log.h"
#include "oslib/colourtrans.h" #include "netsurf/utils/messages.h"
#include "oslib/osspriteop.h" #include "netsurf/utils/utils.h"
#ifdef WITH_SPRITE #ifdef WITH_SPRITE
@ -56,7 +57,7 @@ int sprite_convert(struct content *c, unsigned int width, unsigned int height)
c->width = w; c->width = w;
c->height = h; c->height = h;
c->title = xcalloc(100, 1); c->title = xcalloc(100, 1);
sprintf(c->title, "Sprite image (%lux%lu, %lu bytes)", c->width, sprintf(c->title, messages_get("SpriteTitle"), c->width,
c->height, c->data.sprite.length); c->height, c->data.sprite.length);
c->status = CONTENT_STATUS_DONE; c->status = CONTENT_STATUS_DONE;
return 0; return 0;