Giter Club home page Giter Club logo

i18next's Introduction

Hi! I'm N26. Welcome to my profile ๐Ÿ‘‹

N26 N26 N26

My name is Tyler John Russell, or Nytelife26 on the internet. I am an amateur linguist, hobbyist author, and part-time software engineer from a small town in the UK, currently studying Computer Science at Coventry University.

My most notable projects are my work as a lead developer at:
- Syrus, a Discord bot built on node.js
- Mio, a Discord bot built on Python
- Kludge Cyber Systems INTL., a former tech consultancy and enthusiast forum
- Kludge Cyber Systems Ltd., my startup technology company focused on modern development and OSS

Currently, my focuses are based around Proselint and Sapphire.

Contact me ๐Ÿ“ซ

Miscellaneous info

My stats โค๏ธ

i18next's People

Contributors

adrai avatar aemino avatar anderslemke avatar ashkyd avatar coderstefan avatar dpehrson avatar dwbodine avatar greenkeeperio-bot avatar hugojosefson avatar jamuhl avatar jantrotnow avatar jessehouchins avatar leonarddrs avatar marcbachmann avatar markdon avatar messerm avatar mimecuvalo avatar mjbcopland avatar mogelbrod avatar nburoojy avatar ossdev07 avatar peterdavehello avatar ronami avatar rosskevin avatar stephenldecker avatar strajk avatar strassl avatar tkow avatar vijairamcharan avatar vincentlanglet avatar

Watchers

 avatar  avatar

i18next's Issues

Unexpected behaviour: given language key is automatically reformatted

Refactoring Report

This report details a refactoring required due to unexpected behaviour of the library. May it serve as an RFC.

Problem

Language keys passed to the library are not honoured by default - they are reformatted. This creates problems on certain systems, where filesystems are case sensitive and so reformatting causes the internationalisation files to not be found. This is considered unexpected behaviour.

Expectations

The default behaviour should be to use the provided keys as they are, not to transform them or mutate them in any way automatically. Such behaviours should either be opt-in or left to the end user.

Proposed Solutions

In order of descending difficulty (which is proportional to effectiveness):

  1. Remove automatic formatting from the base library altogether, and move to a plugin of its own
  • Rationale: It should be left to the end user. As per the philosophy that libraries should be general tools from which users can build programs, specialized features merely add to overhead. See: "UNIX Style, or cat -v Considered Harmful" by Robert Pike.
  • Implementation: It would be relatively easy to remove from the base library, as all that takes is to rip out all the involved code and redirect the following functions to use the given keys directly rather than the output. It would also be relatively easy to convert to its own program.
  • Compatibility: This is a breaking change, and should be done as part of a major release. Until the next major release, the functions should remain present, but with a warning added that they will be removed and put into their own plugin.
  1. Make using the given keys the default behaviour, and make all others opt-in rather than opt-out
  • Rationale: It would be much less problematic to implement and require less changes to make these features the opt-out and to make the expected behaviour, which is already implemented, the default.
  • Implementation: All that is required would be to make the opt-out behaviour the default, and convert the alternate behaviours to their own opt-in switches.
  • Compatibility: This is perfectly backwards compatible - all that is necessary to port end projects from the prior version to this proposed version would be to invert the options, assuming they want this behaviour. Code that is already opting-out or does not need the alternate behaviours but just uses the default anyway would remain intact.

Additional Context

See: i18next-fs-background#14.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.