Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.

Beta/contact notify #863

Merged
merged 5 commits into from
Feb 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions Covid19Radar/Covid19Radar/Repository/IExposureDataRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Threading.Tasks;
using Chino;
using Covid19Radar.Model;
using Covid19Radar.Resources;

namespace Covid19Radar.Repository
{
Expand Down Expand Up @@ -38,5 +41,34 @@ int minimumRiskScore

void RemoveExposureInformation();
void RemoveOutOfDateExposureInformation(int offsetDays);

public static string ConvertToDate(DateTime utcDatetime)
=> utcDatetime.Date
.ToLocalTime()
.ToString("D", CultureInfo.CurrentCulture);

public static string ConvertToTerm(DateTime utcDatetime)
{
var from = utcDatetime.Date.ToLocalTime();
var to = from.AddDays(1).ToLocalTime();

bool changeMonth = from.Month != to.Month;
bool changeYear = from.Year != to.Year;

string format = AppResources.ExposureDateFormatDate;
if (changeMonth)
{
format = AppResources.ExposureDateFormatMonth;
}
if (changeYear)
{
format = AppResources.ExposureDateFormatYear;
}

string fromStr = string.Format(AppResources.ExposureDateFormatYear, from.Year, from.Month, from.Day, from.Hour);
string toStr = string.Format(format, to.Year, to.Month, to.Day, to.Hour);

return string.Format("{0} {1} {2}", fromStr, AppResources.ExposuresPageTo, toStr);
}
}
}
84 changes: 75 additions & 9 deletions Covid19Radar/Covid19Radar/Resources/AppResources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 57 additions & 11 deletions Covid19Radar/Covid19Radar/Resources/AppResources.ja.resx
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,10 @@
<value>※スコアは、受信した信号の強さと時間から算出しています。一般的な条件では1m以内・15分以上の接触で100以上になるように設定しています。</value>
<comment>※スコアは、受信した信号の強さと時間から算出しています。一般的な条件では1m以内・15分以上の接触で100以上になるように設定しています。</comment>
</data>
<data name="LowRiskContactPageAnnotationDecription2" xml:space="preserve">
<value>※日時については、協定世界時(UTC)を設定されているタイムゾーンに変換して、期間として表示しています。</value>
<comment>TODO:※日時については、協定世界時(UTC)をを設定されているタイムゾーンに変換して、期間として表示しています。</comment>
</data>
<data name="NoRiskContactPageLabel" xml:space="preserve">
<value>陽性登録者のスマートフォンからの信号を受信していません</value>
<comment>陽性登録者のスマートフォンからの信号を受信していません</comment>
Expand Down Expand Up @@ -322,12 +326,12 @@
<comment>端末の識別</comment>
</data>
<data name="ContactedNotifyPageButton1" xml:space="preserve">
<value>陽性者との接触一覧</value>
<comment>陽性者との接触一覧</comment>
<value>陽性登録者との接触一覧</value>
<comment>TODO:陽性登録者との接触一覧</comment>
</data>
<data name="ContactedNotifyPageMainText" xml:space="preserve">
<value>陽性者との接触確認</value>
<comment>陽性者との接触確認</comment>
<value>陽性登録者との接触確認</value>
<comment>TODO:陽性登録者との接触確認</comment>
</data>
<data name="ContactedNotifyPageTitle" xml:space="preserve">
<value>過去14日間の接触</value>
Expand All @@ -342,7 +346,7 @@
<comment>お問い合わせ(メニュー)</comment>
</data>
<data name="HomePageDescription2" xml:space="preserve">
<value>陽性者との接触結果を確認</value>
<value>陽性登録者との接触結果を確認</value>
<comment>陽性者との接触結果を確認</comment>
</data>
<data name="HomePageDescription3" xml:space="preserve">
Expand Down Expand Up @@ -534,8 +538,8 @@
<comment>過去14日間の接触一覧</comment>
</data>
<data name="ExposuresPageLabel1" xml:space="preserve">
<value>以下の日に陽性者との接触が確認されました。</value>
<comment>以下の日に陽性者との接触が確認されました。</comment>
<value>次の期間に陽性登録者との接触が確認されました。</value>
<comment>TODO:次の期間に陽性登録者との接触が確認されました。</comment>
</data>
<data name="UrlContactedPhone" xml:space="preserve">
<value>https://covid19radarjpnprod.z11.web.core.windows.net/phone.json</value>
Expand Down Expand Up @@ -661,11 +665,32 @@
<value>検査等の相談先を探す</value>
<comment>検査等の相談先を探す</comment>
</data>
<data name="ContactedNotifyPageDescription0" xml:space="preserve">
<value>受診の際に必要となる場合があるため、「陽性登録者との接触一覧」のスクリーンショットを保存してください。</value>
<comment>TODO:受診の際に必要となる場合があるため、「陽性登録者との接触一覧」のスクリーンショットを保存してください。</comment>
</data>
<data name="ContactedNotifyPageDescription1" xml:space="preserve">
<value>・発熱等の症状や基礎疾患がある、新型コロナウイルス感染症の陽性者と接触した心当たりがあるなど、検査等の相談を希望される場合は、アプリの案内に従って相談先をご確認ください。
・受診の際に必要となる場合があるため、以下より陽性者との接触一覧のスクリーンショット(※)を保存してください。</value>
<comment>・発熱等の症状や基礎疾患がある、新型コロナウイルス感染症の陽性者と接触した心当たりがあるなど、検査等の相談を希望される場合は、アプリの案内に従って相談先をご確認ください。
・受診の際に必要となる場合があるため、以下より陽性者との接触一覧のスクリーンショット(※)を保存してください。</comment>
<value>症状がない場合、
陽性者と接触した心当たりがない場合は、
感染対策に留意しつつ普段通りの生活をお送りください。
ただし、体調に変化があった場合は、受診を検討ください。</value>
<comment>TODO:症状がない場合、陽性者と接触した心当たりがない場合は、感染対策に留意しつつ普段通りの生活をお送りください。ただし、体調に変化があった場合は、受診を検討ください。</comment>
</data>
<data name="ContactedNotifyPageDescription2" xml:space="preserve">
<value>次のいずれかに当てはまる方は、アプリの案内に従い、診療・検査医療機関等への受診を検討ください。</value>
<comment>TODO:次のいずれかに当てはまる方は、アプリの案内に従い、診療・検査医療機関等への受診を検討ください。</comment>
</data>
<data name="ContactedNotifyPageDescription3" xml:space="preserve">
<value>・発熱等の症状や基礎疾患がある</value>
<comment>TODO:・発熱等の症状や基礎疾患がある</comment>
</data>
<data name="ContactedNotifyPageDescription4" xml:space="preserve">
<value>・陽性者と接触した心当たりがある</value>
<comment>TODO:・陽性者と接触した心当たりがある</comment>
</data>
<data name="ContactedNotifyPageDescription5" xml:space="preserve">
<value>・その他、受診を希望する</value>
<comment>TODO:・その他、受診を希望する</comment>
</data>
<data name="ReAgreeCheckButton" xml:space="preserve">
<value>確認しました</value>
Expand Down Expand Up @@ -1217,6 +1242,27 @@
<comment>と同じ</comment>
</data>

<data name="ExposuresPageToUtcDescription" xml:space="preserve">
<value>日時については、協定世界時(UTC)を設定されているタイムゾーンに変換して、期間として表示しています。</value>
<comment>TODO:日時については、協定世界時(UTC)をを設定されているタイムゾーンに変換して、期間として表示しています。</comment>
</data>
<data name="ExposuresPageTo" xml:space="preserve">
<value>から</value>
<comment>TODO:から</comment>
</data>
<data name="ExposureDateFormatDate" xml:space="preserve">
<value>{2:#}日{3:#}時</value>
<comment>TODO:{2:#}日{3:#}時</comment>
</data>
<data name="ExposureDateFormatMonth" xml:space="preserve">
<value>{1:#}月 {2:#}日{3:#}時</value>
<comment>TODO:{1:#}月{2:#}日{3:#}時</comment>
</data>
<data name="ExposureDateFormatYear" xml:space="preserve">
<value>{0:#}年{1:#}月 {2:#}日{3:#}時</value>
<comment>TODO:{0:#}年{1:#}月{2:#}日{3:#}時</comment>
</data>

<data name="OpenSourceLicense" xml:space="preserve">
<value>オープンソースライセンス</value>
<comment>オープンソースライセンス</comment>
Expand Down
56 changes: 51 additions & 5 deletions Covid19Radar/Covid19Radar/Resources/AppResources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,10 @@
<value>*The score is calculated based on the strength and time of the received signal. It is set to be 100 or more with contact within 1 m for 15 minutes or more under regular conditions.</value>
<comment>※スコアは、受信した信号の強さと時間から算出しています。1m以内・15分以上の接触で100以上になるように設定しています。</comment>
</data>
<data name="LowRiskContactPageAnnotationDecription2" xml:space="preserve">
<value>For the date and time, Coordinated Universal Time (UTC) is converted to the time zone you set and displayed as a term.</value>
<comment>TODO:※日時については、協定世界時(UTC)をを設定されているタイムゾーンに変換して、期間として表示しています。</comment>
</data>
<data name="NoRiskContactPageLabel" xml:space="preserve">
<value>No signal has being received from the smartphone of a person who has registered positive for COVID-19 </value>
<comment>陽性登録者のスマートフォンからの信号を受信していません</comment>
Expand Down Expand Up @@ -776,12 +780,33 @@
<value>Find COVID-19 Consultation Centers</value>
<comment>検査等の相談先を探す</comment>
</data>
<data name="ContactedNotifyPageDescription0" xml:space="preserve">
<value>Please take a screenshot of the Close Contacts List below, as it may be necessary during the medical examination.</value>
<comment>TODO:受診の際に必要となる場合があるため、「陽性登録者との接触一覧」のスクリーンショットを保存してください。</comment>
</data>
<data name="ContactedNotifyPageDescription1" xml:space="preserve">
<value>・If you have any symptoms such as fever, pre-existing conditions, or if you have been in contact with a person that has been tested positive for COVID-19,
please follow the app. guidance and check the Consultation Centers List to receive a consultation.
・Please take a screenshot of the Close Contacts List below, as it may be necessary during the medical examination</value>
<comment>・発熱等の症状や基礎疾患がある、新型コロナウイルス感染症の陽性者と接触した心当たりがあるなど、検査等の相談を希望される場合は、アプリの案内に従って相談先をご確認ください。
・受診の際に必要となる場合があるため、以下より陽性者との接触一覧のスクリーンショットを保存してください。</comment>
<value>If you do not have any symptoms,
or if you do not know anyone who has had contact with a person that has been tested positive for COVID-19,
please go about your daily life as usual, paying attention to infection control measures.
However, if you have any symptoms, please consider receiving a consultation..
</value>
<comment>TODO:症状がない場合、陽性者と接触した心当たりがない場合は、感染対策に留意しつつ普段通りの生活をお送りください。ただし、体調に変化があった場合は、受診を検討ください。</comment>
</data>
<data name="ContactedNotifyPageDescription2" xml:space="preserve">
<value>If any of the following applies to you, please follow the guidance and check the Consultation Centers List to receive a consultation.</value>
<comment>次のいずれかに当てはまる方は、アプリの案内に従って相談先をご確認ください。</comment>
</data>
<data name="ContactedNotifyPageDescription3" xml:space="preserve">
<value>・If you have any symptoms such as fever, pre-existing conditions.</value>
<comment>TODO:・発熱等の症状や基礎疾患がある</comment>
</data>
<data name="ContactedNotifyPageDescription4" xml:space="preserve">
<value>・If you have been in contact with a person that has been tested positive for COVID-19.</value>
<comment>TODO:・陽性者と接触した心当たりがある</comment>
</data>
<data name="ContactedNotifyPageDescription5" xml:space="preserve">
<value>・If you would like to receive a consultation.</value>
<comment>TODO:・その他、受診を希望する</comment>
</data>
<data name="ReAgreeCheckButton" xml:space="preserve">
<value>Agree</value>
Expand Down Expand Up @@ -1325,6 +1350,27 @@ Note: this app does not collect users’ location information.</value>
<comment>と同じ</comment>
</data>

<data name="ExposuresPageToUtcDescription" xml:space="preserve">
<value>For the date and time, Coordinated Universal Time (UTC) is converted to the time zone you set and displayed as a term.</value>
<comment>TODO:日時については、協定世界時(UTC)をを設定されているタイムゾーンに変換して、期間として表示しています。</comment>
</data>
<data name="ExposuresPageTo" xml:space="preserve">
<value>to</value>
<comment>TODO:から</comment>
</data>
<data name="ExposureDateFormatDate" xml:space="preserve">
<value>{2:#} {3:#}:00</value>
<comment>TODO:{2:#}日 {3:#}時</comment>
</data>
<data name="ExposureDateFormatMonth" xml:space="preserve">
<value>{1:#}/{2:#}/ {3:#}:00</value>
<comment>TODO:{1:#}月{2:#}日 {3:#}時</comment>
</data>
<data name="ExposureDateFormatYear" xml:space="preserve">
<value>{0:#}/{1:#}/{2:#} {3:#}:00</value>
<comment>TODO:{0:#}年{1:#}月{2:#}日 {3:#}時</comment>
</data>

<data name="OpenSourceLicense" xml:space="preserve">
<value>Open Source License</value>
<comment>オープンソースライセンス</comment>
Expand Down
Loading