-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Instead of trying to reuse some old strings, deprecate some other strings, and have them coexist in the same file, I have decided to deprecate the `L10n.swift` class altogether, and create a new one called `Localization.swift`. This allows me to remove that horrible abbreviated name, and also make a clear distinction between old and new. With this, all new strings will just go to the `Localizable.strings` as always, and the `Deprecated.strings` ones shouldn't be used anymore. This was done by adding two `.stencil` files: one that handles adding the `@deprecated` line to the old file, and a new one that handles ignoring all strings that start with `android`. This is because on the new way to do strings, the Android-specific ones will start with `android.`. We could remove these from the file, but this would be manual, some could be missed, and at the moment of this PR, we haven't yet determined how we are going to sync these strings with the strings in the Glia Hub. Finally, the new `Localization.swift` file is `internal`, as opposed to `L10n.swift` which is public. This is because these strings have changed from being the main way to show strings in the widgets, to being a fallback. Now, the Glia Hub will be the main way to pass strings to the widgets, so there's no need to shoot ourselves in the foot, making this public, and then have to worry about deprecations, as we have to do with `L10n.swift`. With this, there's no need to have `L10n+BackwardsCompatibility.swift`, as the new strings and the old ones are separated entities. However, I still need to do a layer that goes between the strings and the rest of the code, for when the strings have functionality that is not present anymore (example, placeholders for values that now just have the direct value in the string). In a year, we can easily remove `L10n.swift` and the associated `.stencil` file. MOB-2529
- Loading branch information
1 parent
37fd885
commit e980848
Showing
8 changed files
with
1,433 additions
and
967 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.