INSERT INTO TextContent (OriginalText, OriginalLanguage)
VALUES ("Ciao", "it");
Shouldn’t that be TextContent(TextContentId, OriginalText)
? Something like
(then you should make the id a primary key, index originaltext and make the id in the other table a foreign key)
I could drop TextContent too, and just have a Translations table with TextContentId
Sure, but the you would have to reference the text via TextContentId
in your code, which would be very annoying.
Instead you could have a function, say t("Ciao")
that kinda runs something like (of course loading all the translations in ram at startup and referencing that would be better than running a query for each and every string).
select t.translation
from textcontent tc
join translations t on t.textcontentid = tc.textcontentid
where tc.originaltext = ?
and t.language = ?
The function could also return the originaltext and log an error message if a translation is not found.
BTW 1: most frameworks/languages have i18n facilities/libraries - you may investigate one and use it instead of rolling your own.
BTW 2: why would you put the translations in a database? what’s the advantage compared to files?
If it’s for backup, zfs and btrfs can send incremental diffs quite efficiently (but of course you’ll have to use those on both ends).
Otherwise, both NFS and SMB are certainly viable.
I tried both but TBH I ended up just using SSHFS because I don’t care about becoming and NFS/SMB admin.
NFS and SMB are easy enough to setup, but then when you try to do user-level authentication… they aren’t as easy anymore.
Since I’m already managing SSH keys all over my machines, I feel like SSHFS makes much more sense for me.
AFAIU bluehost does not support the acme protocol, so you’ll either have to manage your certificate manually or (recommended!) move to a different dns registrar.
If you are wondering which provider you should switch to, basically all the serious ones will work… IDK if this is relevant for nginx, but here’s a list of the supported ones for the client I use https://go-acme.github.io/lego/dns/
If you are unsure and want to experiment before touching your current setup, you could register a new cheap domain (less than 1$, see https://tld-list.com/), use it for your tests, and then not renew it.
Not sure if others already said this (I seem to see mostly comments explaining how to do it, but didn’t read them all), but, while it’s certainly feasible, you may not want to do that.
A router is the cornerstone of your network (if it goes down, so does the network) and if you are a self-hoster you’ll probably fiddle endlessly with your home server, and of course break it from time to time… the two things just don’t go well together.
Personally, I’d recommend getting some second-hand router appliance that can run openwrt and use that (make sure to check the flashing procedure before deciding what to buy - some are easier than others). Or you could get a dedicated x86 machine… probably overkill though.
Seems fun :)
Beware that the check passport screen and the one before it may make it look like a papers please clone (which it definitely seems not to be after looking/reading further) - maybe move them further down in presentation order?
I went through my answers (and questions) and poisoned them little by little every day with errors
You are an evil genius (also, a very determined one - I wouldn’t have had the patience).
deleted by creator
deleted by creator
The .apk is actually there (see other comment). You can sideload it manually or use something like Obtainium
Apologies: brain fart on my end.
For anyone using Obtainium: you’ll have to enable “include prereleases” when adding manatee-fitness in order for Obtainium to find the apk
…and/or adding .apk releases in github? (I doubt many will build from source)
TLDR:
What the author baptizes “do-nothing scripts” are interactive scripts that print out the steps of some procedure one by one and wait for you to confirm each step (eg. “1. do this. press enter when done” “2. do something else. press enter when done” and so forth).
PS:
@OP (if you are the author)
I HATE those sites where popups come up when you are halfway reading something.
What’s the idea behind it, besides annoying your users as much as possible?
deleted by creator
For those kind of issues I’d recommend snapshots instead of backups
Syncthing or unison might be what you want
Your system will appeal to the intersection between people who like gambling and people who like donating to charities.
Even among them, I don’t see why anyone would prefer putting 100$ in your web3 thingie instead of just donating 50$, gambling with 45$, and buying a beer with the 5$ they would lose to you… well, there are a lot of stupid peculiar people (especially among crypto bros), so you might actually be ok.
About the implementation, the 50% to charities should be transferred automatically… what’s the point of a smart contract if people must trust you to “check the total donations and create a donation on The Giving Block”?
PS:
IDK about the US, but where I live gambling is regulated very strictly: make sure to double check with a lawyer before getting into trouble.
2 more cents :)
I’ve been using syncthing for a while now, on different devices, and the only unreliability I’ve run into is with android killing syncthing to save battery life, which is kinda hilarious, considering all the vendor- and google-provided crap they happily waste battery on (I don’t use it, but for what I’ve heard iOS is even worse in this regard).
Specifically, I have a samsung tablet where, no matter how much I tinkered with system settings, synchthing would only run if I manually launched the app or while the tablet was charging (BTW I still use that same tablet, but it now runs LineageOS and syncthing works flawlessly).
All this is to say, you should probably look into system settings and research ways to convince your OS to do what it’s supposed to rather than tinkering with syncthing itself.
Oh, then you could consider having one extra table per entity (one-to-many) with the translatable stuff:
create table some_entity ( id .. primary key, -- fields for attributes that are not translated price .., created_on .., deleted_on .., .. ); create table some_entity_i18n( id .. primary key, some_entity_id .. foreign key references some_entity(id), locale .., -- one field per translatable attribute title .., description .., .. );
IMHO putting everything in one big table will only complicate things in the long run.