Fixes a large number of cases where strings are translated then
formatted, instead of letting `_()` do the formatting internally,
which allows it to recover from incorrect translations (missing,
broken, or extra placeholders).
Also
- removes translation markers entirely when there's nothing to
translate e.g. `_("%s - %s")` is not useful
- fixes a few messes which lead to only partial translatability
(DRY is generally a bad idea when translations are involved, even
more so when you don't make the variable part translatable)
- fixes a few nearby issues noticed at the same time
- replaces a few `"%s"` by `%r`, which should automatically quote
strings relatively appropriately
- fixes translated strings which use `\` to escape a newline (in order
to fill-paragraph): `\` escapes only the newline, if the
continuation string is indented this results in a bunch of spaces
ending in the string to translate, which is pretty garbage for the
translator, using implicit concatenation works much better
Note: some of the updates revert f-string parameters to %, because
babel (2.9) apparently has trouble with f-strings and blows up trying
to extract them.
Not in scope:
Helping translators fix translatable strings e.g. any translation
string with more than one placeholder probably should use keyword
placeholders
- Provides more context / data to the translator to make sense of the
sentence.
- Allows reordering the translated terms, which can be necessary
depending on the sentence and language.
closesodoo/odoo#139314
Related: odoo/enterprise#49311
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
According to Wiktionary, French spacing is "the archaic practice (though
still current in French) of inserting a space around colons, semicolons,
question marks, and exclamation marks". This is not standard practice in
English and most languages of the world.
The purpose of this commit is to start purging the code from this typo,
as it may reflect poorly on the software for some people.
closesodoo/odoo#114533
Related: odoo/enterprise#37853
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
When overriding an existing controller route, developers can
easily c/p the route definition and call super() in the overridden method
when the route attributes are automatically deducted by odoo from the parent route.
Removing those redefined attributes simplifies the routes definition,
clearly highlighting what's changed by the override.
Also reduces unexpected behavior when modifying the base route without
noticing/considering the redefined attributes in a overridden route,
which overrides the changes made to the base route when the sub-module is installed.
This commit adds a test to catch routes attributes redefinition, and clean existing routes.
closesodoo/odoo#108512
Related: odoo/enterprise#35176
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Cleanup all the places where an hour or a datetime is been used
to display with the date the corresponding timezone.
The goal is to know the timezone used where a datetime is displayed
on the event pages.
task-2458013
COM PR: odoo#78049
Part-of: odoo/odoo#78049
This branch adds request.redirect on all requests.
In case of a front end request, we do an url_for to the location.
We removed redirect_with_hash that was only for retro compatibility
local_redirect has been renamed to redirect_query, and param keep_hash has been
removed and moved.
Default code for redirect is 303 now instead of 302.
Now redirect and redirect_query make local redirect by default, you need to
pass local=False to make external redirect.
All werkeug.utils.redirect has been replaced by request.redirect.
Http.redirect now use an http.Response type, and it become easy to add an
override like 'set_cookies' e.g.
Dispatch of a website.page return an http.response too, so we first need to
check if it is a cached version before to check if it is an Odoo Response.
Migrate your code:
http.redirect -> request.redirect(location, code, local)
http.local_redirect -> request.redirect_query(location, query, code, local)
http.redirect_with_hash -> request.redirect
Courtesy of odony for help and review ;)
closesodoo/odoo#72599
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Currently, the usability for unpublished exhibitor is not optimum.
For example, on `/exhibitors` page, we show the exhibitors in random
order where sometimes unpublished ones might come before the published
ones. And on the sidebar of the exhibitors, there's no visual indication
for unpublished record and they do not always appear after the published
ones. Same for the sponsor/exhibitor list that appears at he bottom of
almost all event pages.
This commit does the following improvements:
- For `/exhibitors` page, now first there will be random published
exhibitors, and after that, there will be random unpublished
exhibitors (class used to lower opacity is now removed as it
will be handled by publish management related data attributes).
- Clicking on any of this exhibitors, on the left sidebar, now
we display unpublished exhibitors at the last, with lower
opacity and 'Unpublished' tag.
- The 'Connect' button on exhibitors is now positioned absolutely
so that the opacity does not apply on it for unpublished
exhibitors.
- For the sponsors list appearing at the bottom of almost all
event pages, now the unpublished sponsors will appear at last
with lower opacity and 'Unpublished' tag below them.
- In a special case of sponsor list appearing in `/community`
page, the unpublished sponsors were displayed to all the
users, because the event record was passed with sudo. We
remove this sudo attribute, which seems not necessary.
taskID-2346612
Currently, if the room is unpublished, it`s never shown to users
(even if user is event user / manager).
This commit improves behaviour by displaying unpublished rooms to
specific users (in /community page). Below are the main changes:
- The unpublished rooms are now displayed to event users and
managers, after published ones and with lower opacity.
- The drop-down menu for managing rooms is now absolutely
positioned so that the opacity does not apply on the buttons
for unpublished rooms.
taskID-2346612
Bug
===
The registration users should be able to read the event tickets.
Allow the registration users to see unpublished event record on website
(Jitsi room, sponsors, track...).
Task 2506148
closesodoo/odoo#70615
X-original-commit: 3eef17203661919a067a4f0d8d99c2b3b6fcf233
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
This commit generally improves some of the event application layouts.
SPECS
- Add new rules to handle long text properly.
- Set a maximum height for the dropdown menu.
- Minor margin and padding adjustments.
- Reduce border radius of status badge.
- Remove the rounded corners of the cards.
- Remove the "wishlist" terminology.
- Fix the href attribute of the event name.
- Fix image distortion of the sponsor cards (backend).
- Hide viewer count when there is no viewer.
- Limiting the expansion of the meeting room aside block.
- Various other minor changes coming from user testing
LINKS
Task-2347597
COM PR odoo/odoo#69102
ENT PR odoo/enterprise#17612
X-original-commit: cfbe1096ec34411a7abe9a9510dc4289e15db1cb
Purpose
=======
Before, the Event Manager could make some action on the frontend size,
like joining full meeting room, see unpublished track...
Now, the Event User has more permissions and can create Event, Track...
So, we want also to change the logic on the frontend side and allow him
to do the same actions as the Event Manager.
Task ID-2204364
COM odoo/odoo#57022
ENT odoo/enterprise#13984
UPG odoo/upgrade#1897
Before this commit, routes were prevented to be accessed if the route model was
not accessible from the current website, eg you couldn't access blog1 which is
set to website2 from website 1.
That would raise a 404 even from admin/editor.
This commit introduce that behavior at a lowel level in a generic way, instead
of having to write it on every route.
Note that routes without a model converter won't benefit from this.
Closes#63499closesodoo/odoo#64313
Related: odoo/enterprise#15688
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
This commit adapts the business code in which
class/module/function/method redefinition took place so that it no
longer happens and the pylint test passes.
Allow creation of room for unpublished events for base users so that
they can prepare all their rooms before releasing their event in the wild.
LINKS:
TaskID:2339835
closes odoo/odoo#58141
Pr: #57799
X-original-commit: 4cecd66821a1f4493fe321b9886df51d946fd779
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit fixes a few wording and view issues, notably:
- Avoid breaking the talk description page when description is very long
- Modify all occurrences of "starts at" to "starts on" (better wording)
- Move the "hide sponsor" concept from _exhibitor to _track_online
To be able to hide the sponsors on the "registration confirmed" template
- Hide the sponsor block in "mobile" view (breakpoint md)
- Make some minor layout adjustments
Task ID-2325327
PR odoo/odoo#56430
X-original-commit: 342799035911123b609876268a86c1da251f7645
From now, you need to explicitely add sitemap=True if you want your controller
into the sitemap. It's the default value, but if you forgot it, it will raise
a Warning on runbot. It will avoid wrong controller in sitemap and duplicate
(empty) content. From now, if your model contains a field website_id, the
modelConverter for sitemap will automatically add the domain:
"[('website_id', 'in', (False, current_website_id))]"
It avoid redundant declaration and ugly url in redirect/rewrite view.
Task ID: 2318597
closesodoo/odoo#56114
X-original-commit: aabd31d1523fb6ca68336cc66a6e2f074173f396
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
PURPOSE
Clean organization and models linked to Event Online feature introduced in
semi stable saas-13.3 at odoo/odoo@981f95bbf4 and odoo/enterprise@14722028ae
Also clean website event menu not being available in website event but only
in website event track, which implies some extra-code to manage it.
In short: merge website_event_online in website_event, website_event_track
_(online/session) in website_event_track.
RATIONALE
_online modules have been added to extend content of website_event and
website_event_track without having any impact on those module. First step
of cleaning is to move this content directly in base module.
track_session module is mainly a rewrite of track module. Second step of
cleaning is to move its content directly in website_event_track.
SPECIFICATIONS
Move website event menu model directly into website event. Website event menu
model has been introduced to help dealing with event-specific menus and
website menus. This is some kind of glue to synchronize both of them as people
could either
* update an event (website_menu, website_track) that updates website menus
availability;
* update menus through website that should update event field value and menu
computation;
Having a model introduced in website event track forces to have override and
code split across website_event, website_event_track, and now also in both
_online version of those two as menu management was improved.
In this commit we simplify all this code by moving most of menu management
code in website_event, leaving only business-specific code (fields and their
menus) to sub modules.
SPECIFICATIONS: WEBSITE EVENT MENU
Make type required as we don't support entries without type. Indeed this model
is used to automate menus generation / destruction, and not for hand-made
menus. We therefore set type as required and add a cascade ondelete for
selection.
SPECIFCIATIONS: COMMUNITY MENU
Doing this change allows to define community menu in website_event and re-use
it in website_event_meet and website_event_track_quiz, removing some
unnecessary dependencies. This menu is void in website_event, and displays
either meeting rooms (in meet) or quiz points leaderboard (in quiz), or a
mix of both if the two features are installed.
LINKS
Task ID-2319779
COM odoo/odoo#56067
ENT odoo/enterprise#12520
UPG odoo/upgrade#165
ATIONALE
Events are sometimes held online, gathering a community. In this merge we
improve Event application to better support full-online events with improved
tracks, wishlists, chat rooms, ...
PURPOSE
Purpose of this commit is to completely redesign the talks pages and frontend
flow. Notably better showcase live or upcoming talks, have a usable tracks list,
provide reworked page view with tracks suggestions, ...
SPECIFICATIONS
Mockups are given in https://docs.google.com/presentation/d/1VSxp2luUvp9xLFq9d1Wy-6IC0mP0NA8vLmh44WE5PCs/edit#slide=id.g891af57392_0_84
Main ideas are
* based on sponsor: exhibitors are upgraded sponsor with chat capabilities;
* new pages: view for all exhibitors and view for a specific exhibitor;
* list view: display a cards-based view of exhibitors, ordered by sponsorship
level. This page allows to filter exhibitors and search on them;
* page view: new page view of an exhibitor. Two tabs: main content holds chat
(jitsi-based) and information. Aside tab contains suggestions of exhibitors
based on a given heuristics;
SPECIFICATIONS: EXHIBITOR
Use sponsor model. Upgrade it with a boolean flag telling it is an exhibitor.
By default exhibitors have a chat room configured, using the previously-added
chat.room model using jitsi. Add a catchphrase (slogan) as well as opening
hour support (hours when jitsi is available for customers).
SPECIFICATIONS: LIST VIEW
Display a cards-based view of exhibitors. Display basic informations: cover
picture, title, catchphrase, country. When clicking on an exhibitor, behavior
depends on configuration
* before the event: redirect to /register (if not registered) or display a
popup telling it is not started yet;
* during the event: during meeting hours, open page view of exhibitor with
jitsi-based chat room opened by default (if defined). Outside of opening
hours, display a popul telling it is closed;
* after event: display page view of exhibitor, jitsi is closed;
SPECIFICATIONS: PAGE VIEW
Display a main content tab, with exhibitor description, contact information.
If defined, display the jitsi room. This is the default behavior for exhibitors.
Display an aside tab, with exhibitors suggestions following this heuristics
* currently opened;
* same country;
* same language;
* finally a random to have an "equivalent wave" randomly given;
In mobile, main content should take the whole screen and aside should be
collapsed. That way we put emphasis on main content.
LINKS
Task ID-2252655 (Main Online Event task)
Task ID-2283738 (Sponsors -> Exhibitors upgrade)
Co-Authored-By: Aurélien Warnon <awa@odoo.com>
Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
RATIONALE
Events are sometimes held online, gathering a community. In this merge we
improve Event application to better support full-online events with improved
tracks, wishlists, chat rooms, ...
PURPOSE
Allow the website visitors to meet at online events using chat rooms. Those are
based on jitsi rooms previously added.
SPECIFICATIONS
Define a new model holding discussion rooms, with their target and a publish
management. Inherit from chat.room mixin to enable jitsi-based chat.
Any website visitor can create a meeting room based on Jitsi. Using some
information (name, summary, room size, languyage) anyone can launch a new
discussion topic. This will make a link with a new jitsi room enabling people
to chat. Visitor-community rooms creation can be turned off on event itself.
Meeting rooms can be pinned by the event managers to choose which rooms are
displayed on top. Managers can also duplicate the full meeting rooms if a topic
is popular, or publish/unpublish rooms like usual website records.
SPECIFICATIONS: LIST VIEW
Display a card-based list view of meeting rooms. They can be filtered by
language. When a meeting room reach the maximum number of participants it is
not visible anymore for standard visitors.
The meeting rooms unpinned are cleaned after a certain period of time if there
is no activity in it usign the autovacuum cron. That way we keep a clean view
on the frontend and we keep the important (pinned) meeting rooms.
SPECIFICATIONS: PAGE VIEW
Use the same main content / aside panel display as exhibitors / tracks, to
display the jitsi in the main content. Left panel proposes suggestions of
rooms, based on current one.
When a visitor join a meeting room, we fill the jitsi username with the name
he entered during his registration.
LINKS
Task ID-2252655 (Main Online Event task)
Task ID-2283742 (Community gathering on chat rooms)
Co-Authored-By: Aurélien Warnon <awa@odoo.com>
Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Stéphane Debauche <std@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>