File tree Expand file tree Collapse file tree
app/backend/src/couchers/notifications Expand file tree Collapse file tree Original file line number Diff line number Diff line change 290290 "title" : " New host request from {{user}}" ,
291291 "ios_title" : " {{user}}" ,
292292 "ios_subtitle" : " New Host Request" ,
293- "body_one" : " {{user}} wants to stay from {{start_date}} for {{count}} day ." ,
294- "body_other" : " {{user}} wants to stay from {{start_date}} for {{count}} days ."
293+ "body_one" : " {{user}} wants to stay from {{start_date}} for {{count}} night ." ,
294+ "body_other" : " {{user}} wants to stay from {{start_date}} for {{count}} nights ."
295295 }
296296 },
297297 "message" : {
Original file line number Diff line number Diff line change @@ -509,14 +509,14 @@ def _render_general__new_blog_post(
509509def _render_host_request__create (
510510 data : notification_data_pb2 .HostRequestCreate , loc_context : LocalizationContext
511511) -> PushNotificationContent :
512- days = (date .fromisoformat (data .host_request .to_date ) - date .fromisoformat (data .host_request .from_date )).days + 1
512+ night_count = (date .fromisoformat (data .host_request .to_date ) - date .fromisoformat (data .host_request .from_date )).days
513513 return _get_content (
514514 NotificationTopicAction .host_request__create ,
515515 loc_context ,
516516 substitutions = {
517517 "user" : data .surfer .name ,
518518 "start_date" : loc_context .localize_date_from_iso (data .host_request .from_date ),
519- "count" : days ,
519+ "count" : night_count ,
520520 },
521521 icon_user = data .surfer ,
522522 action_url = urls .host_request (host_request_id = data .host_request .host_request_id ),
You can’t perform that action at this time.
0 commit comments