wito

joined 1 year ago
[–] [email protected] 11 points 11 months ago (3 children)

It's not about corporate instances. It's the bots and fake accounts/posts/comments. That's one of the issues with Reddit. There are little authentic posts. Most of them are advertisements it just reposts to farm karma to avoid detection. It's ridiculous.

[–] [email protected] 10 points 11 months ago* (last edited 11 months ago)

And you sound salty bro πŸ™ƒ

[–] [email protected] 27 points 11 months ago (6 children)

Not only that, but the community is small enough that large corporations and marketing companies don't care about it. Yet ;)

[–] [email protected] 2 points 11 months ago
[–] [email protected] 6 points 11 months ago (1 children)

and I mostly work on my own projects

Then your opinion is absolutely understandable.

It’s also frustrating b/c types don’t guarantee that the system does-the-thing, only that the type-system and compiler are happy, so it’s like pleasing the wrong boss, or some metaphor like that.

Types help you refactoring and communicating with other team members about expected inputs/outputs. Did you ever try debugging a number that should've been a string in a codebase that you didn't write? Example from today: jsforce will throw an exception when you pass a number instead of string due to the fact that the Salesforce server will complain that the type is incorrect. If the method had correct typing of "string", it would save me a few hours of debugging a huge library without visibility inside of it...

[–] [email protected] 10 points 11 months ago (2 children)

Have you heard about our lord and savior, TypeScript?

[–] [email protected] 16 points 11 months ago (1 children)

Increased from a very low level due to the fact that we imported gas through pipelines. Overall imports dropped significantly.

The title is misleading.

[–] [email protected] 1 points 1 year ago

Quite a lot of IDEs will key you just click "add missing properties" action on the translation object to create a language file.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

It's also quite ready to transform this file to JSON and send it to translators through any service that supports his format.

[–] [email protected] 3 points 1 year ago* (last edited 1 year ago) (12 children)

If you are using TypeScript it's quite easy to create a system where the type system will enforce the existence of all translations. I think it should be possible to create a similar solution for other languages as well.

For example:

const enTranslations = { MENU: '' };

const plTranslations: typeof enTranslations = { MENU: '' } as const;

const t = (key: keyof typeof enTranslations) => get language() == 'pl' ? plTranslations[key] : enTranslations[key];

Missing keys will fail compilation. If you want to skip check you can always use //@ts-ignore

Additionally the type system will enforce only valid translation keys so you won't be able to make a typo it forget to add English translation.

view more: β€Ή prev next β€Ί