Commit Graph

15 Commits

Author SHA1 Message Date
absidue a94910df27
Serve files from a custom protocol instead of using file:// (#4987) 2024-04-23 21:24:59 +00:00
absidue 27eecb9e0b
Simplify static file loading (#4971) 2024-04-18 01:09:29 +00:00
absidue bc6b88231e
Add locale fallbacks for "es_AR", "es-MX", "pt-BR" and "pt-PT" (#4892)
* Add fallback to "es" when strings are missing in "es_AR" and "es-MX"

* Add fallbacks for pt-PT and pt-BR too
2024-04-11 07:59:01 -04:00
absidue c29d947d5c
Avoid extending the VueI18n class as it won't exist in Vue 3 (#4046) 2023-09-18 18:39:36 +00:00
ChunkyProgrammer 43a25f8738
update linters & add stylelint (#3023)
* update linters, add stylelint, switch from sass to scss

* remove unused babel-eslint module

* fix spacing in scss files

* dont use npm in script calls

* dont error for `:deep` selector in css
2023-01-03 19:19:41 +01:00
absidue 1d1e6eacea
Switch from sync fs APIs to fs/promises (#2991)
* Switch from sync fs APIs to fs/promises

* Fix error and await storyboard creation

* Start a new file for filesystem helpers starting with pathExists
2022-12-29 01:19:48 +00:00
absidue 56416700bc
Allow webpack to omit development only dependencies properly (#2828) 2022-11-05 14:44:21 +00:00
Emma 6e693c6c37
Implement `getRegionData` in web (#2743)
* Implement `getRegionData` in web

- Adjust __dirname to be a more sensible value
- Add `process.env.GEOLOCATION_NAMES` for web builds to avoid having
to blindly try and fetch

* Reverting webpack changes

* Change `indexOf` to `includes`

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>

* Adding a new helper `createWebURL`

It takes a given path to a resource, and it returns an
 easily fetch-able absolute path

* Using `createWebUrl` inside of the locale fetch

* Using `createWebURL` inside of `getRegionData`

* Removing an unnecessary leftover import

* Wait, no I was mistaken

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
2022-10-22 10:31:34 +02:00
Emma b453b01b81
Adding web support to dev-runner (#2729)
* Adding ytpl and ytsr as externals in web.config

This should get rid of those two warnings that were
showing up on web builds

* Reducing discrepancies between dev and prod in web builds

* Removing  a line which would prevent hot reloading

`this.locales` is retained between hot reloads, so it shouldn't
be set to `null`.

* Adding a new flag to the dev runner

Adding a new command: `run dev:web`

* Running `loadLocale` in development web builds

* Adding a line back which was removed

* Removing a line which was added
2022-10-18 08:50:32 -04:00
absidue c0f98eeafe
Use named parameters instead of $ and % in localised strings (#2685)
* Use named parameters instead of $ and % in localised strings

* Fix URL warning again

* Update placeholders in most locales

* Let the translators fix the problematic RTL strings

* Fix the missing quotes in some of the YAML files
2022-10-13 11:51:15 +00:00
Emma f722340962
Prevent adding extra `/` when concatenating locale paths (#2665)
* Formatting the locales pathname to be more accurate

Before this change, the URL would refer
`https://localhost//static/locales/${locale}.json`
which technically works in most web browsers,
but it does not work in Cordova at all, so this
changes the links to be more accurately:
`https://localhost/static/locales/${locale}.json`

* Removing usage of `path` because it requires a polyfill/shim

* Linting the code
2022-10-02 23:38:01 +00:00
absidue ac4cc4a611
Compress and lazy load locales (#2603)
* Compress and lazy load locales

* Remove index.html when loading the locales on the web

* Fix locale output path for web build
2022-09-24 11:06:50 -04:00
ChunkyProgrammer 7822f7423e
Remove console.logs (#2606)
* remove console.logs

* use 'off' instead of 0
2022-09-23 09:04:10 +08:00
ChunkyProgrammer 997b6c2f35
allow more locales to be used by FreeTube (#2322) 2022-07-08 18:01:58 +08:00
Svallinn 5cc954066b
Renderer: Move vue-i18n to its own file 2021-06-20 02:40:40 +01:00