mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-03 17:54:33 +03:00
Fix last uses of !NetSurf outside of riscos build
This commit is contained in:
parent
c1e30c0c3a
commit
e864997842
2
Makefile
2
Makefile
@ -130,7 +130,7 @@ MESSAGES_FILTER=any
|
||||
# The languages in the fat messages to convert
|
||||
MESSAGES_LANGUAGES=de en fr it nl
|
||||
# The target directory for the split messages
|
||||
MESSAGES_TARGET=!NetSurf/Resources
|
||||
MESSAGES_TARGET=resources
|
||||
|
||||
# Defaults for tools
|
||||
PERL=perl
|
||||
|
@ -68,7 +68,7 @@ package-amiga: netsurf.lha
|
||||
AMIGA_LANGUAGES := de en it ja nl
|
||||
AMIGA_PLATFORM_RESOURCES := Pointers Themes default.css default.css.info favicon.png LangNames mimetypes Resource.map splash.png
|
||||
AMIGA_GENERIC_RESOURCES := $(AMIGA_LANGUAGES) ca-bundle Icons
|
||||
AMIGA_RESOURCES := $(addprefix $(FRONTEND_SOURCE_DIR)/resources/,$(AMIGA_PLATFORM_RESOURCES)) $(addprefix \!NetSurf/Resources/,$(AMIGA_GENERIC_RESOURCES))
|
||||
AMIGA_RESOURCES := $(addprefix $(FRONTEND_SOURCE_DIR)/resources/,$(AMIGA_PLATFORM_RESOURCES)) $(addprefix resources/,$(AMIGA_GENERIC_RESOURCES))
|
||||
AMIGA_DISTRIBUTION_FILES := $(FRONTEND_SOURCE_DIR)/dist/*
|
||||
AMIGA_PKG_DIR := $(FRONTEND_SOURCE_DIR)/pkg
|
||||
AMIGA_INSTALL_TARGET_DIR := NetSurf_Amiga
|
||||
@ -82,11 +82,11 @@ netsurf.lha: $(EXETARGET)
|
||||
$(Q)cp -rp $(AMIGA_RESOURCES) $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources
|
||||
$(Q)cp -rp $(AMIGA_DISTRIBUTION_FILES) $(AMIGA_INSTALL_TARGET_DIR)/NetSurf
|
||||
$(Q)cat resources/SearchEngines $(AMIGA_PKG_DIR)/SearchEngines >$(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources/SearchEngines
|
||||
$(Q)cp -p \!NetSurf/Resources/AdBlock,f79 $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources/adblock.css
|
||||
$(Q)cp -p \!NetSurf/Resources/CSS,f79 $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources/nsdefault.css
|
||||
$(Q)cp -p \!NetSurf/Resources/internal.css,f79 $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources/internal.css
|
||||
$(Q)cp -p \!NetSurf/Resources/Quirks,f79 $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources/quirks.css
|
||||
$(Q)cp -p \!NetSurf/Resources/netsurf.png,b60 $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources/netsurf.png
|
||||
$(Q)cp -p resources/addblock.css $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources/adblock.css
|
||||
$(Q)cp -p resources/default.css $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources/nsdefault.css
|
||||
$(Q)cp -p resources/internal.css $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources/internal.css
|
||||
$(Q)cp -p resources/quirks.css $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources/quirks.css
|
||||
$(Q)cp -p resources/netsurf.png $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources/netsurf.png
|
||||
$(Q)cp -p $(AMIGA_PKG_DIR)/drawer.info $(AMIGA_INSTALL_TARGET_DIR)/NetSurf.info
|
||||
$(Q)cp -p $(AMIGA_PKG_DIR)/AutoInstall $(AMIGA_INSTALL_TARGET_DIR)
|
||||
ifeq ($(SUBTARGET),os3)
|
||||
|
@ -3,26 +3,26 @@
|
||||
failat 50
|
||||
makedir Resources
|
||||
cd Resources
|
||||
makelink AdBlock.css /!NetSurf/Resources/AdBlock,f79 soft
|
||||
makelink AdBlock.css /resources/adblock.css soft
|
||||
makelink default.css /amiga/resources/default.css soft
|
||||
makelink ca-bundle /!NetSurf/Resources/ca-bundle soft
|
||||
makelink de /!NetSurf/Resources/de soft
|
||||
makelink nsdefault.css /!NetSurf/Resources/CSS,f79 soft
|
||||
makelink ca-bundle /resources/ca-bundle soft
|
||||
makelink de /resources/de soft
|
||||
makelink nsdefault.css /resources/default.css soft
|
||||
makelink favicon.png /amiga/resources/favicon.png soft
|
||||
makelink Resource.map /amiga/resources/Resource.map soft
|
||||
makelink en /!NetSurf/Resources/en soft
|
||||
makelink fr /!NetSurf/Resources/fr soft
|
||||
makelink internal.css /!NetSurf/Resources/internal.css,f79 soft
|
||||
makelink it /!NetSurf/Resources/it soft
|
||||
makelink en /resources/en soft
|
||||
makelink fr /resources/fr soft
|
||||
makelink internal.css /resources/internal.css soft
|
||||
makelink it /resources/it soft
|
||||
makelink LangNames /amiga/resources/LangNames soft
|
||||
makelink netsurf.png /!NetSurf/Resources/netsurf.png,b60 soft
|
||||
makelink nl /!NetSurf/Resources/nl soft
|
||||
makelink netsurf.png /resources/netsurf.png soft
|
||||
makelink nl /resources/nl soft
|
||||
makelink Pointers /amiga/resources/Pointers soft
|
||||
makelink quirks.css /!NetSurf/Resources/Quirks,f79 soft
|
||||
makelink quirks.css /resources/quirks.css soft
|
||||
makelink SearchEngines /amiga/resources/SearchEngines soft
|
||||
makelink splash.png /amiga/resources/splash.png soft
|
||||
makelink Themes /amiga/resources/Themes soft
|
||||
makelink mimetypes /amiga/resources/mimetypes soft
|
||||
|
||||
/
|
||||
makelink amiga/resources/nsdefault.css //!NetSurf/Resources/CSS,f79 soft
|
||||
makelink amiga/resources/nsdefault.css //resources/default.css soft
|
||||
|
@ -118,8 +118,8 @@ ATARI_FONT_SOURCE_URL := http://ftp.gnome.org/pub/GNOME/sources/ttf-bitstream-ve
|
||||
#ATARI_FONT_SOURCE_URL := http://localhost/$(ATARI_FONT_NAME).tar.gz
|
||||
ATARI_FONT_TMP_DIR := $(DEPROOT)/../
|
||||
ATARI_FONT_SOURCE_DIR := $(ATARI_FONT_TMP_DIR)$(ATARI_FONT_NAME)/
|
||||
ATARI_GENERIC_RESOURCES := de en it ja
|
||||
ATARI_RESOURCES := $(addprefix \!NetSurf/Resources/,$(ATARI_GENERIC_RESOURCES))
|
||||
ATARI_GENERIC_RESOURCES := de en it ja nl
|
||||
ATARI_RESOURCES := $(addprefix resources/,$(ATARI_GENERIC_RESOURCES))
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Install target
|
||||
@ -168,21 +168,21 @@ endif
|
||||
$(Q)cp $(ATARI_RES_DIR)/netsurf.rsc $(ATARI_TARGET_DIR)res/netsurf.rsc
|
||||
$(Q)cp $(ATARI_RES_DIR)/languages $(ATARI_TARGET_DIR)res/languages
|
||||
$(Q)cp $(ATARI_RES_DIR)/icons/toolbar -R $(ATARI_TARGET_DIR)res/icons
|
||||
$(Q)cp \!NetSurf/Resources/Icons/* -R $(ATARI_TARGET_DIR)res/icons/
|
||||
$(Q)cp resources/icons/* -R $(ATARI_TARGET_DIR)res/icons/
|
||||
|
||||
$(Q)cp \!NetSurf/Resources/netsurf.png,b60 $(ATARI_TARGET_DIR)res/netsurf.png
|
||||
$(Q)cp \!NetSurf/Resources/AdBlock,f79 $(ATARI_TARGET_DIR)res/adblock.css
|
||||
$(Q)cp \!NetSurf/Resources/CSS,f79 $(ATARI_TARGET_DIR)res/default.css
|
||||
$(Q)cp \!NetSurf/Resources/Quirks,f79 $(ATARI_TARGET_DIR)res/quirks.css
|
||||
$(Q)cp \!NetSurf/Resources/internal.css,f79 $(ATARI_TARGET_DIR)res/internal.css
|
||||
$(Q)cp \!NetSurf/Resources/SearchEngines $(ATARI_TARGET_DIR)res/search
|
||||
$(Q)cp \!NetSurf/Resources/ca-bundle $(ATARI_TARGET_DIR)res/cabundle
|
||||
$(Q)cp resources/netsurf.png $(ATARI_TARGET_DIR)res/netsurf.png
|
||||
$(Q)cp resources/adblock.css $(ATARI_TARGET_DIR)res/adblock.css
|
||||
$(Q)cp resources/default.css $(ATARI_TARGET_DIR)res/default.css
|
||||
$(Q)cp resources/quirks.css $(ATARI_TARGET_DIR)res/quirks.css
|
||||
$(Q)cp resources/internal.css $(ATARI_TARGET_DIR)res/internal.css
|
||||
$(Q)cp resources/SearchEngines $(ATARI_TARGET_DIR)res/search
|
||||
$(Q)cp resources/ca-bundle $(ATARI_TARGET_DIR)res/cabundle
|
||||
$(Q)$(RM) $(ATARI_TARGET_DIR)res/messages
|
||||
$(Q)$(SPLIT_MESSAGES) -l en -p atari -f messages -o $(ATARI_TARGET_DIR)res/messages resources/FatMessages
|
||||
$(Q)cp \!NetSurf/Resources/en/welcome.html,faf $(ATARI_TARGET_DIR)res/welcome.html
|
||||
$(Q)cp \!NetSurf/Resources/en/maps.html,faf $(ATARI_TARGET_DIR)res/maps.html
|
||||
$(Q)cp \!NetSurf/Resources/en/licence.html,faf $(ATARI_TARGET_DIR)res/licence.html
|
||||
$(Q)cp \!NetSurf/Resources/en/credits.html,faf $(ATARI_TARGET_DIR)res/credits.html
|
||||
$(Q)cp resources/en/welcome.html $(ATARI_TARGET_DIR)res/welcome.html
|
||||
$(Q)cp resources/en/maps.html $(ATARI_TARGET_DIR)res/maps.html
|
||||
$(Q)cp resources/en/licence.html $(ATARI_TARGET_DIR)res/licence.html
|
||||
$(Q)cp resources/en/credits.html $(ATARI_TARGET_DIR)res/credits.html
|
||||
|
||||
# copy "Bitstream Vera" font:
|
||||
$(Q)cp $(ATARI_FONT_SOURCE_DIR)RELEASENOTES.TXT $(ATARI_TARGET_DIR)res/fonts/
|
||||
|
@ -1,83 +0,0 @@
|
||||
#!/usr/bin/env lua5.1
|
||||
|
||||
local lfs = require "lfs"
|
||||
|
||||
local en_stat = assert(lfs.attributes "!NetSurf/Resources/en/Messages")
|
||||
local language = { }
|
||||
local sorted = { }
|
||||
|
||||
io.stderr:write("loading non-en languages...\n");
|
||||
|
||||
for dir in lfs.dir "!NetSurf/Resources" do
|
||||
local path = "!NetSurf/Resources/" .. dir
|
||||
if dir ~= "en" and lfs.attributes(path .. "/Messages") then
|
||||
local f = io.open(path .. "/Messages", "r")
|
||||
local c = 0
|
||||
io.stderr:write(dir, ":")
|
||||
language[dir] = { }
|
||||
sorted[#sorted + 1] = dir
|
||||
for l in f:lines() do
|
||||
if l:sub(1, 1) ~= "#" then
|
||||
local tag, msg = l:match "^([^:]*):(.*)$"
|
||||
if tag then
|
||||
language[dir][tag] = msg
|
||||
c = c + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
f:close()
|
||||
io.stderr:write(tostring(c), " entries.\n")
|
||||
end
|
||||
end
|
||||
|
||||
table.sort(sorted)
|
||||
|
||||
io.stderr:write("working through en...\n")
|
||||
|
||||
local manipulators = {
|
||||
{ "^(ami.*)", "ami.%1" },
|
||||
{ "^(gtk.*)", "gtk.%1" },
|
||||
{ "^(Help.*)", "ro.%1" },
|
||||
{ "^(ARexx.*)", "ami.%1" },
|
||||
|
||||
{ "^(.*)$", "all.%1" } -- must be last
|
||||
}
|
||||
|
||||
local function manipulate_tag(t)
|
||||
for _, m in ipairs(manipulators) do
|
||||
local r, s = t:gsub(m[1], m[2])
|
||||
if s > 0 then return r end
|
||||
end
|
||||
return t
|
||||
end
|
||||
|
||||
local f = io.open("!NetSurf/Resources/en/Messages", "r")
|
||||
|
||||
for l in f:lines() do
|
||||
if l:sub(1,1) == "#" then
|
||||
print(l)
|
||||
else
|
||||
local tag, msg = l:match "^([^:]*):(.*)$"
|
||||
if not tag then
|
||||
print(l)
|
||||
else
|
||||
local mtag = manipulate_tag(tag)
|
||||
io.stdout:write("en.", mtag, ":", msg, "\n")
|
||||
for _, langname in ipairs(sorted) do
|
||||
local trans = language[langname][tag]
|
||||
if not trans then
|
||||
io.stderr:write("*** language ", langname, " lacks translation for ", mtag, "/", tag, "\n")
|
||||
trans = msg
|
||||
end
|
||||
io.stdout:write(langname, ".", mtag, ":", trans, "\n")
|
||||
language[langname][tag] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for _, langname in ipairs(sorted) do
|
||||
for tag in pairs(language[langname]) do
|
||||
io.stderr:write("*** language ", langname, " contains orphan tag ", tag, "\n")
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user