Граф коммитов

187 Коммитов

Автор SHA1 Сообщение Дата
Matjaž Horvat da516ae8a8
Unify user data API between server and frontend (#3432)
* Unify position of the "email" key/property between backend and various frontend definitions
* Add missing "theme" key to the ApiUserData type
2024-11-06 07:51:39 +01:00
Francesco Lodolo 4b23a5dfc9
Introduce project manager status banner (#3422)
1. Add a banner for users defined as "Project Manager" within a project. To reduce confusion, the MNGR tooltip has been changed from from "Manager" to "Team Manager".

2. Consolidate roles between backend and frontend:
* If a user as a role within the locale (translator, manager), we use that for the banner
* If a user is set as PM, we use that even if the user is an Admin
* The isAdmin flag is true if the user is a superuser, not PM
* Introduce isPM flag and use it where isAdmin was used before
* Rename: managerForLocales -> canManageLocale, translatorForLocales -> canTranslateLocales
* Introduce managerForLocales and translatorForLocales and use them in UserStatus instead of canManageLocales and canTranslateLocales

3. Other changes:
* Add CSS variables for users, instead of reusing the ones for translation status
* Ignore system users for banners
* Use status identifier as a class name
* The term role is already taken, let's settle for status consistently

---------

Co-authored-by: Matjaž Horvat <matjaz.horvat@gmail.com>
2024-11-05 15:37:07 +01:00
Matjaž Horvat 68b36c4e79
Make priority starts visible in the Filter Panel on hover (#3424) 2024-10-24 09:28:36 +02:00
Matjaž Horvat 8c301bbbcb
Fix count background when menu items are hovered or selected (#3411)
* Fix count background when hovering filters
* Fix count background color when sidebar item is selected
2024-10-16 16:00:29 +02:00
Matjaž Horvat 205ea14cf6
Fix favicon links in Translate and 500 pages (#3409) 2024-10-15 19:09:50 +02:00
Harmit Goswami 3910a994f7
Add role banner under user avatar (#3400) 2024-10-13 23:48:32 +02:00
Matjaž Horvat 9cd2038b9d
Add new Pontoon logo (#3407) 2024-10-11 16:30:09 +02:00
Eemeli Aro 56d243e76e
Clean up .gitignore, dropping /translate/.gitignore as unnecessary (#3401) 2024-10-08 13:20:28 +03:00
Francesco Lodolo 174a9512c1
Update to eslint v9 (#3385) 2024-09-30 22:00:32 +02:00
Francesco Lodolo d931216452
Update prettier to version 3.3.3 (#3386) 2024-09-30 10:11:52 +02:00
Harmit Goswami 07117c70b5
Created inital test cases for SearchPanel (#3361)
* Created test file

* Created initial test cases for SearchPanel component

* Added backend test cases, failing redux test case

* Linting fixes

* Seperated backend tests into different functions

* Removed print statements

* Formatted backend tests to use args and kwargs

---------

Co-authored-by: Harmit Goswami <hgoswami@harmits-mbp.home>
Co-authored-by: Harmit Goswami <hgoswami@Harmits-MacBook-Pro.local>
2024-09-26 17:02:07 +02:00
Matjaž Horvat 6c9b90eac6
Update reactour to latest version (#3377) 2024-09-25 19:03:38 +02:00
Francesco Lodolo e167d08b2e
Collect coverage for npm test in /translate (#3364) 2024-09-22 16:28:15 +02:00
Harmit Goswami 491399afe6
Fixed bugs regarding state preservation (#3356)
* Clicking outside of the search options will lose selected checkboxes
* Clicking on "APPLY SEARCH OPTIONS" will reload the page, but won't use the input field text to search
2024-09-20 08:46:09 +02:00
Harmit Goswami 8aa2a6e7f5
Tweaked search panel design (#3352) 2024-09-18 18:16:29 +02:00
flx-sta 50e0dcf825
Add i18next format support to editFieldModes (#3341)
Co-authored-by: Eemeli Aro <eemeli@gmail.com>
2024-09-16 22:25:01 +03:00
Harmit Goswami 86dcd27ff1
Exclude message identifiers when searching Fluent strings (#3336) 2024-09-13 22:26:13 +02:00
Matjaž Horvat d838000743
Make search panel visible on all screen widths (#3332) 2024-09-13 07:56:11 +02:00
flx-sta ed596da81f
Double curly-brackets placeholders (#3328) 2024-09-12 12:13:06 +03:00
Harmit Goswami b8cd6c0aac
Implement filter for matching whole words (#3326) 2024-09-11 22:58:51 +02:00
Harmit Goswami 0403dfdab6
Fix bug when Match Case and Translations Only filter were active (#3319) 2024-09-10 16:35:34 +02:00
Harmit Goswami 7c56875d65
Implement search filter for matching case (#3318) 2024-09-09 19:35:14 +02:00
Harmit Goswami 6df98ce479
Implement filter for searching in rejected translations (#3317) 2024-09-06 16:40:50 +02:00
Harmit Goswami 24256cdc9a
Implement Search Filter for searching within translations only (#3316) 2024-09-05 23:00:56 +02:00
Harmit Goswami 1dd5c81069
Add search options panel with an option to exclude string identifiers (#3288)
- Does not work for Fluent strings yet.
- The feature is temporarily disabled while the rest of the search options are implemented.
2024-09-03 22:58:27 +02:00
ayanaar fd37b6105c
Implement UX Logging and Fix LLM Translation Shortcut Functionality (#3241) 2024-08-29 17:44:49 +02:00
ayanaar f1e958d83c
Enhance user action logging (#3273) 2024-07-04 18:24:13 +02:00
Harmit Goswami 86041d97ff
Show the correct review time in tooltip (#3270)
Also: unify datetime formats between tooltips.
2024-07-03 22:52:48 +02:00
Harmit Goswami cd0a3fdac4
Add reviewed time information to reviewed strings tooltip (#3263) 2024-07-02 10:20:35 +03:00
Harmit Goswami 5bb0877614
Added capability to mention users by username (#3253) 2024-06-07 20:43:19 +02:00
Harmit Goswami 17965f2585
Fixed spacing bug after mentions in comments (#3252) 2024-06-06 18:12:29 +02:00
Harmit Goswami a19ec1fb0f
Upgraded @codemirror dependencies to latest versions (#3250)
Co-authored-by: Harmit Goswami <hgoswami@MacBook-Pro.local>
2024-05-31 17:32:55 +02:00
ayanaar 071829c820
Fix LLM machinery source issue in database (#3230) 2024-05-15 20:05:52 +02:00
Matjaž Horvat 890be4a534
Add new tour card for email communications (#3229) 2024-05-14 22:34:37 +02:00
Harmit Goswami 98d017e52d
Added proposed styling changes for r-to-l languages (#3210)
Co-authored-by: Harmit Goswami <hgoswami@LH7VKLQY46.local>
2024-05-10 18:05:44 +02:00
Matjaž Horvat 70d888e8cc
Disable tooltip in LLM Dropdown (#3193) 2024-04-29 18:18:10 +02:00
Matjaž Horvat 2d2aab9039
LLM-Assisted Translations Frontend (rebased again) (#3191)
Co-authored-by: Ayanaa Rahman <ayanaa.rahman@mail.utoronto.ca>
2024-04-29 16:37:56 +02:00
Matjaž Horvat b0bfcc2954
Do not make requests to non-configured Machinery services (#3181)
Translate view makes requests to Google Translate and Microsoft Translator backend code even if API keys are not set.
While the requests to external services are not made in this case, we should still prevent the redundant call to Pontoon backend.
2024-04-17 22:56:28 +02:00
Eemeli Aro e996d94cfa
Drop support for the .lang format (#3163)
* Fix remaining failing test

---------

Co-authored-by: Matjaž Horvat <matjaz.horvat@gmail.com>
2024-04-04 19:54:44 +02:00
Matjaž Horvat 3c93c0fe06
Use proper paging for entities (#3129)
We currently use a weird way of paginating entities - in each request we include a list of already loaded entities, which we exclude from the matching entities in Django and then return the first page of the remaining entities. This is a relic of the react-infinite-scroller library which we no longer use.

We should implement proper paging, i.e. drop exclude_entities and only return the relevant page.

That should also speed up loading of entities, because NOT IN DB queries tend to be slow and because less data will be transferred.
2024-03-12 16:37:22 +01:00
Cedric Amaya cb942ca554
Fix <Highlight /> search miscapitalization (#3134)
Problem:
In the search results list, highlighted parts of strings are currently
inherited from the search box, including its capitalisation, making
the source/translated string appear different from its actual state in
the search results list.

Solution:
Updated `<Highlight />` component to preserve the capitalization of the
source text in the search results list. The highlighted marks now
reflect the original capitalization of the source string.
2024-03-12 09:30:48 +01:00
Matjaž Horvat 42a5285abd
Use correct Google Translate AutoML locale (#3060)
For locales that use the same locale code in Google Translate (e.g. es-AR and es-ES both use es),
we now use the correct locale code in Machinery Google Translate if AutoML is enabled.
2024-01-15 14:58:46 +01:00
Matjaž Horvat 5edbcad8d2
Restore Translate view full height (#3055)
It turns out the CSS property removed in cc7d3503db was not so unused afterall.
2023-12-18 23:08:08 +01:00
Matjaž Horvat 8b1542df49
Fix Request Context button Contact person mention (#3051) 2023-12-18 09:53:33 +01:00
Matjaž Horvat 0aeaa3e047
Fix broken translate view when filters result in no matches (#3054)
Always use Hooks at the top level of your React function:
https://legacy.reactjs.org/docs/hooks-rules.html#only-call-hooks-at-the-top-level
2023-12-18 09:37:35 +01:00
ayanaar 2cea74df2c
Fix Missing Link in Comment Notifications (#3049) 2023-12-14 11:22:11 +01:00
Matjaž Horvat a4c8c289ea Reposition menus on narrow screens and add 2-column view (#3044)
* Fix positions of menus and overlays on narrow screens
* Always show target locale code in the navbar
* Implement a 2-column UI for middle screen widths between 600 and 800 pixels

Also:
* Expand Header navigation breakpoint to the middle screens
* Prevent jumping when moving between tabs
* useNarrowScreen() -> useWindowWidth()
2023-12-11 22:26:15 +01:00
Matjaž Horvat 2f613fa74d Reposition panels in a single-column translate view (#3038)
Details:
* Only show one Helpers panel at the same time
* Use dot rather than count as the tab indicator
* Make visual distinction between the History panel and the Helpers.
* Add support for batch actions in the single-columm UI

Also included:
* Move OriginalString component and friends out of Metadata component
* Unify Term tab count behaviour with other Helper tabs: do not show 0
* Unify dark-theme.css and light-theme.css structure
* De-hardcode and fix color value in the FiltersPanel
2023-12-11 22:26:15 +01:00
Matjaž Horvat 3c02eeb69f Implement a single-column UI for smaller screens (#3024)
* Move third column under the middle column
* Add Entities list toggle
* Animate switching between the editor and the string list
* When hovering over strings in the string list, show indicator to open the editor
* Hide main navigation
* For easier development, move all @media max-width to App.css temporarily

Also:
* Remove unused flex properties
* Drop 700px transition on the header
2023-12-11 22:26:15 +01:00
Matjaž Horvat ae74bc474a
Restore notification panel delay back to 2 seconds (#3033) 2023-11-23 18:12:47 +01:00