Commit Graph

531 Commits

Author SHA1 Message Date
Samantaz Fox
76cc8ac66b HTML escape error message 2022-02-08 01:48:44 +01:00
Dimitris Apostolou
7e4690e43c Fix typos 2022-02-07 14:57:14 +02:00
jonas-w
00df3e2c40 Refactored code and added badges to Search but many dummies because of the way components/item works 2022-02-04 19:59:07 +01:00
Samantaz Fox
519c227c4f Use short syntax for 'File.open' block 2022-01-29 13:43:26 +01:00
Samantaz Fox
12b818a83c Fix more 'Lint/ShadowingOuterLocalVar' warnings reported by ameba 2022-01-28 02:19:53 +01:00
Samantaz Fox
2d949834e9 Make 'additional_fields' optional in JSON error template functions
This allows us to de-duplicate functions
2022-01-28 02:19:53 +01:00
Samantaz Fox
c7b74aa8b4 Remove useless 'locale' argument from error template functions 2022-01-28 02:19:53 +01:00
Samantaz Fox
8c2495a399 Apply suggestions from review 2022-01-17 21:47:29 +01:00
Samantaz Fox
34a79c5f1e Don't show "next steps" message with a stack trace
Usually, next steps are after the error message.
Here, we want the same options to be right above the stack trace,
so users are less likely to report duplicates.
2022-01-16 16:15:23 +01:00
Samantaz Fox
a2600acfa9 Improve crash page messages
* Ask to read the FAQ and search for existing issues on Github
* Include links to FAQ and directly to a new github issue
* Github issue title is automatically based on exception name
* Improved HTML
* Minor languages changes
2022-01-16 16:15:23 +01:00
Samantaz Fox
eb7e79fdf7 i18n: Apply code review suggestions + code cleaning 2022-01-10 22:49:07 +01:00
Samantaz Fox
5bb2cb7d71 i18n: Use plurals for video/view/subscriber/subscription counts 2022-01-10 22:49:07 +01:00
Samantaz Fox
692f4e5be2 i18n: Use plurals for year/month/day/etc... 2022-01-10 22:49:07 +01:00
Samantaz Fox
7bb1471207 i18n: Add dedicated function for counts translation 2022-01-10 22:49:07 +01:00
Samantaz Fox
4752e16ad2 i18n: make multiple fixes to i18next plurals 2022-01-10 22:49:07 +01:00
Samantaz Fox
67d2635e41 i18n: Add i18next plural rules and selector 2022-01-10 22:26:45 +01:00
Samantaz Fox
71a1ad307c i18n: Add i18next plural resolver class 2022-01-10 22:26:45 +01:00
Samantaz Fox
9a48fd81a3 i18n: Add i18next plurals base sets 2022-01-10 22:26:45 +01:00
Samantaz Fox
302fecbdcb Clean useless database arguments (5/5) 2022-01-04 17:15:43 +01:00
Samantaz Fox
d74873fed1 Clean useless database arguments (4/5) 2022-01-04 17:15:43 +01:00
Samantaz Fox
c25d664edc Clean useless database arguments (2/5) 2022-01-04 17:15:43 +01:00
Samantaz Fox
6704ce3214 Move DB utility functions to the proper module 2022-01-04 17:15:43 +01:00
Samantaz Fox
914cfbd953 Move DB queries related to 'annotations' in a separate module 2022-01-04 17:15:43 +01:00
Samantaz Fox
094f835642 Move DB queries related to 'users' in a separate module (1/2) 2022-01-04 17:13:52 +01:00
Samantaz Fox
92eea3b18b Move DB queries related to session tokens in a separate module 2022-01-04 17:13:52 +01:00
Samantaz Fox
c021b93b5c Move DB queries related to channels in a separate module 2022-01-04 17:13:52 +01:00
Samantaz Fox
a779cdd463 Merge pull request #2727 from SamantazFox/add-shorts-support
Add support for shorts
2021-12-28 22:13:36 +01:00
Samantaz Fox
fc2b9031d4 i18n: Add Serbian back 2021-12-22 00:52:08 +01:00
Samantaz Fox
f54e247eb4 Extractors: Add support for shorts
Fixes #2708
2021-12-17 16:47:41 +01:00
Samantaz Fox
2ea0590b03 i18n: return 'key' if 'key' is not in locales files 2021-11-25 19:46:34 +01:00
Samantaz Fox
bf7952d9c7 i18n: log a warning instead of rising an exception
This is more user-friendly.
TODO: maybe make a compile time flag for testing purposes
2021-11-21 01:54:54 +01:00
Samantaz Fox
139786b9ef i18n: pass only the ISO code string to 'translate()'
Don't use the whole Hash everywhere.
Also fall back nicely to english string if no translation exists.
2021-11-21 01:50:11 +01:00
Samantaz Fox
9966c21c6b i18n: Add list of language names 2021-11-21 01:50:11 +01:00
Samantaz Fox
0ec94405ce Add TODO comments to other places 2021-10-29 16:26:42 +02:00
Samantaz Fox
33780f1995 Also fix 'to_json' in struct Video 2021-10-29 16:26:35 +02:00
Samantaz Fox
1cb715ac9f serialized_yt_data: force datatype of 'locale' 2021-10-28 17:48:08 +02:00
Samantaz Fox
f65b628bf3 serialized_yt_data: Remove default nil value in to_json
this will ensure that two parameters are passed and that it
doesn't collide with 'to_json(builder)'
2021-10-28 17:48:07 +02:00
Samantaz Fox
60fa552469 Fix an infinite recursion caused by #2228
Changes in the aforementioned PR lead to change the behavior
of some old code.

The data type of the parameters aren't explicit enough, which
makes the compiler use the wrong method because of type infering.
2021-10-28 17:48:07 +02:00
Samantaz Fox
2b81a82620 Merge pull request #2529 from DmitrySandalov/master
Feature Request: Localization for trending iv-org#331
2021-10-26 23:49:56 +02:00
syeopite
575c66efd3 Remove extra dot between [] from ambea copy-pasting. 2021-10-25 01:14:14 -07:00
syeopite
dd8c412abc Fix Style/IsAFilter issues 2021-10-25 01:14:08 -07:00
syeopite
e969c1490a Fix Performance/ChainedCallWithNoBang issues 2021-10-25 01:12:26 -07:00
syeopite
e91421253e Fix Style/VerboseBlock issues 2021-10-25 01:12:26 -07:00
syeopite
20cb751ff6 Fix Lint/UnusedArgument issues 2021-10-25 01:12:26 -07:00
Dmitry Sandalov
0e17d026f2 Feature Request: Localization for trending (fix lint CONTENT_REGIONS end comma) 2021-10-21 23:38:49 +03:00
Dmitry Sandalov
1d78d67af3 Feature Request: Localization for trending (move TRENDING_REGIONS to i18n.cr as CONTENT_REGIONS) 2021-10-21 22:30:49 +03:00
syeopite
c8a985cc77 Merge pull request #2477 from SamantazFox/move-prefs-and-config
Move user preferences and server config
2021-10-18 17:06:07 +00:00
Samantaz Fox
33d9be0ffb Move 'extractors.cr' to 'yt_backend' folder 2021-10-18 16:12:49 +02:00
Samantaz Fox
2571e420f3 Move 'add_yt_headers()' to 'connection_pool.cr' 2021-10-18 16:12:18 +02:00
Samantaz Fox
e17c8b1f4d Move 'extract_videos' and 'extract_selected_tab' too 2021-10-18 16:12:18 +02:00