me-web? 0.15.0: address blocks from Asia, Africa and Latin America too
- The provider card now names the address block your connection belongs to in Asia and the Pacific, in Africa, and in Latin America and the Caribbean, not only in Europe and the Middle East. The blocks come from the address registries APNIC, AFRINIC and LACNIC, used with their permission, and travel inside the app, so this works without a connection too. - In Latin America and the Caribbean the registry gives no names for its blocks, so the card says how the block was handed out instead, for example "passed on by the provider to one of its customers". - The app is about 6 MB larger, because it carries these blocks. - The app's name no longer has quotation marks where it stands on its own: the window title, the name under the icon, the version line and the website's titles. Inside a sentence it keeps them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
599ea2bf84
commit
6209c7f2e1
134 files changed
+1026
-433
No files matched your search
+1
-1
@@ -75,7 +75,7 @@ void Report()
|
||||
using (var input = File.OpenRead(path)) networks = NetworkTable.Read(input);
|
||||
path = Path.Combine(output, "registry.bin");
|
||||
using var registry = File.Exists(path) ? RegistryTable.Open(File.OpenRead(path)) : null;
|
||||
Console.WriteLine($"knowledge: {table.Count} networks in the provider map (source {table.SourceDate:yyyy-MM-dd}), {networks?.Count ?? 0} with names or upstreams, {registry?.Count ?? 0} named address blocks");
|
||||
Console.WriteLine($"knowledge: {table.Count} networks in the provider map (source {table.SourceDate:yyyy-MM-dd}), {networks?.Count ?? 0} with names or upstreams, {registry?.Count ?? 0} address blocks");
|
||||
}
|
||||
|
||||
static string FindRoot()
|
||||
|
||||
+5
-5
@@ -36,7 +36,7 @@ var android = Path.Combine(root, "src", "MeWeb.Android", "MeWeb.Android.csproj")
|
||||
var server = Path.Combine(root, "src", "MeWeb.Server", "MeWeb.Server.csproj");
|
||||
var branding = Path.Combine(root, "branding");
|
||||
Directory.CreateDirectory(output);
|
||||
Console.WriteLine($"“me-web?” {version} ({commit}): {string.Join(", ", targets)} -> {output}");
|
||||
Console.WriteLine($"me-web? {version} ({commit}): {string.Join(", ", targets)} -> {output}");
|
||||
if (targets.Count == 0)
|
||||
{
|
||||
WriteNotes();
|
||||
@@ -81,7 +81,7 @@ void WriteNotes()
|
||||
var lines = Changes();
|
||||
lines.AddRange(
|
||||
[
|
||||
$"“me-web?” {version}, commit {commit}, built {builtAt}.",
|
||||
$"me-web? {version}, commit {commit}, built {builtAt}.",
|
||||
"",
|
||||
"Built with these open network datasets:",
|
||||
"",
|
||||
@@ -127,7 +127,7 @@ string Linux()
|
||||
File.WriteAllText(Path.Combine(stage, "software.arasaka.meweb.desktop"), """
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=“me-web?”
|
||||
Name=me-web?
|
||||
Comment=Can you run your own server from here?
|
||||
Comment[it]=Si può ospitare un server da questa connessione?
|
||||
Exec=meweb
|
||||
@@ -275,8 +275,8 @@ string MacOs()
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleName</key><string>“me-web?”</string>
|
||||
<key>CFBundleDisplayName</key><string>“me-web?”</string>
|
||||
<key>CFBundleName</key><string>me-web?</string>
|
||||
<key>CFBundleDisplayName</key><string>me-web?</string>
|
||||
<key>CFBundleIdentifier</key><string>software.arasaka.meweb</string>
|
||||
<key>CFBundleVersion</key><string>{version}</string>
|
||||
<key>CFBundleShortVersionString</key><string>{version}</string>
|
||||
|
||||
+9
-2
@@ -10,6 +10,7 @@ var placeholder = new Regex(@"\{\d+\}");
|
||||
const string Name = "me-web?";
|
||||
var quotes = JsonNode.Parse(File.ReadAllText(Path.Combine(root, "data", "languages.json"))).AsArray()
|
||||
.ToDictionary(n => (string)n["code"], n => ((string)n["quotes"][0], (string)n["quotes"][1]));
|
||||
var alone = new HashSet<string>(["AppName", "VersionLine"], StringComparer.Ordinal);
|
||||
var named = new Regex(@"(?:«[\u00A0\u202F ]|[""'“”„‟«»‹›「」『』‘’‚])?me-web\?(?:[\u00A0\u202F ]»|[""'“”„‟«»‹›「」『』‘’‚])?");
|
||||
|
||||
if (args.Length >= 1 && args[0] == "check") return Check();
|
||||
@@ -31,12 +32,18 @@ int Check()
|
||||
var code = Path.GetFileNameWithoutExtension(file);
|
||||
var values = Read(code);
|
||||
var (open, close) = quotes[code];
|
||||
var bare = values.Where(p => Bare(p.Value, open, close)).Select(p => p.Key).ToList();
|
||||
var bare = values.Where(p => !alone.Contains(p.Key) && Bare(p.Value, open, close)).Select(p => p.Key).ToList();
|
||||
if (bare.Count > 0)
|
||||
{
|
||||
problems++;
|
||||
Console.WriteLine($"{code}: {Name} not between {open.Trim()} and {close.Trim()} in [{string.Join(", ", bare)}]");
|
||||
}
|
||||
var quoted = values.Where(p => alone.Contains(p.Key) && named.Matches(p.Value).Any(m => m.Value != Name)).Select(p => p.Key).ToList();
|
||||
if (quoted.Count > 0)
|
||||
{
|
||||
problems++;
|
||||
Console.WriteLine($"{code}: {Name} quoted where it stands alone in [{string.Join(", ", quoted)}]");
|
||||
}
|
||||
if (code == "en") continue;
|
||||
var missing = english.Keys.Where(k => !values.ContainsKey(k)).ToList();
|
||||
var extra = values.Keys.Where(k => !english.ContainsKey(k)).ToList();
|
||||
@@ -125,7 +132,7 @@ int Quote()
|
||||
var code = Path.GetFileNameWithoutExtension(file);
|
||||
var (open, close) = quotes[code];
|
||||
var strings = Read(code);
|
||||
var quoted = new SortedDictionary<string, string>(strings.ToDictionary(p => p.Key, p => named.Replace(p.Value, open + Name + close)), StringComparer.Ordinal);
|
||||
var quoted = new SortedDictionary<string, string>(strings.ToDictionary(p => p.Key, p => named.Replace(p.Value, alone.Contains(p.Key) ? Name : open + Name + close)), StringComparer.Ordinal);
|
||||
if (quoted.SequenceEqual(strings)) continue;
|
||||
Write(code, quoted);
|
||||
changed++;
|
||||
|
||||
Reference in new issue
Block a user