mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-02 17:26:24 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e54f954f31 | |||
| bf6a66d52c | |||
| 260e1ef023 | |||
| 262741bf89 | |||
| 3438a2aa48 | |||
| 00fcb69423 | |||
| dbcdecb6a7 |
@@ -102,21 +102,61 @@ object TrekBilling {
|
|||||||
return offers.firstOrNull { it.offerId == null } ?: offers.firstOrNull()
|
return offers.firstOrNull { it.offerId == null } ?: offers.firstOrNull()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Play returns eligible offers. The named offer must be configured with Play's new-customer eligibility. */
|
||||||
|
private fun trialOffer(product: ProductDetails): ProductDetails.SubscriptionOfferDetails? {
|
||||||
|
val base = baseOffer(product)?.takeIf { it.offerId == null } ?: return null
|
||||||
|
val recurring = base.pricingPhases.pricingPhaseList.singleOrNull() ?: return null
|
||||||
|
return product.subscriptionOfferDetails?.firstOrNull { offer ->
|
||||||
|
offer.offerId == TRIAL_OFFER_ID && offer.basePlanId == base.basePlanId &&
|
||||||
|
isSevenDayTrial(offer.pricingPhases.pricingPhaseList, recurring)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun isSevenDayTrial(
|
||||||
|
phases: List<ProductDetails.PricingPhase>,
|
||||||
|
recurring: ProductDetails.PricingPhase,
|
||||||
|
): Boolean {
|
||||||
|
if (phases.size != 2) return false
|
||||||
|
val (trial, renewal) = phases
|
||||||
|
val once = trial.recurrenceMode == ProductDetails.RecurrenceMode.NON_RECURRING ||
|
||||||
|
(trial.recurrenceMode == ProductDetails.RecurrenceMode.FINITE_RECURRING && trial.billingCycleCount == 1)
|
||||||
|
return once && trial.priceAmountMicros == 0L && trial.billingPeriod in listOf("P1W", "P7D") &&
|
||||||
|
renewal.recurrenceMode == ProductDetails.RecurrenceMode.INFINITE_RECURRING &&
|
||||||
|
renewal.billingPeriod == recurring.billingPeriod && renewal.priceAmountMicros == recurring.priceAmountMicros &&
|
||||||
|
renewal.priceCurrencyCode == recurring.priceCurrencyCode
|
||||||
|
}
|
||||||
|
|
||||||
fun products(context: Context, call: PluginCall) {
|
fun products(context: Context, call: PluginCall) {
|
||||||
val ids = call.getArray("ids")?.toList<String>().orEmpty()
|
val ids = call.getArray("ids")?.toList<String>().orEmpty()
|
||||||
ready(context) { ok ->
|
ready(context) { ok ->
|
||||||
val result = JSObject().put("sandbox", BuildConfig.DEBUG)
|
val result = JSObject().put("sandbox", BuildConfig.DEBUG)
|
||||||
if (!ok) return@ready call.resolve(result.put("products", JSArray()))
|
if (!ok || ids.isEmpty()) return@ready call.resolve(result.put("products", JSArray()))
|
||||||
details(context, ids) { found ->
|
details(context, ids) { found ->
|
||||||
val list = JSArray()
|
val candidates = found.filter { trialOffer(it) != null }.map { it.productId }.toSet()
|
||||||
for (product in found) displayPrice(product)?.let { list.put(JSObject().put("id", product.productId).put("displayPrice", it)) }
|
if (candidates.isEmpty()) {
|
||||||
call.resolve(result.put("products", list))
|
call.resolve(result.put("products", productList(found, emptySet())))
|
||||||
|
return@details
|
||||||
|
}
|
||||||
|
val params = QueryPurchasesParams.newBuilder().setProductType(BillingClient.ProductType.SUBS).build()
|
||||||
|
client(context).queryPurchasesAsync(params) { status, purchases ->
|
||||||
|
val eligible = status.responseCode == BillingClient.BillingResponseCode.OK && purchases.none { purchase ->
|
||||||
|
purchase.products.any { it.startsWith(PREFIX) }
|
||||||
|
}
|
||||||
|
call.resolve(result.put("products", productList(found, if (eligible) candidates else emptySet())))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun productList(products: List<ProductDetails>, freeTrials: Set<String>): JSArray = JSArray().apply {
|
||||||
|
for (product in products) displayPrice(product)?.let { price ->
|
||||||
|
put(JSObject().put("id", product.productId).put("displayPrice", price).put("freeTrial", product.productId in freeTrials))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun purchase(activity: Activity, call: PluginCall) {
|
fun purchase(activity: Activity, call: PluginCall) {
|
||||||
val id = call.getString("productId") ?: return call.reject("productId is required")
|
val id = call.getString("productId") ?: return call.reject("productId is required")
|
||||||
|
val trialRenewalPrice = call.getString("trialRenewalPrice")
|
||||||
ready(activity) { ok ->
|
ready(activity) { ok ->
|
||||||
if (!ok) return@ready call.resolve(JSObject().put("kind", "failed"))
|
if (!ok) return@ready call.resolve(JSObject().put("kind", "failed"))
|
||||||
// One subscription per Google account: a second plan would run beside the first.
|
// One subscription per Google account: a second plan would run beside the first.
|
||||||
@@ -126,19 +166,28 @@ object TrekBilling {
|
|||||||
client(activity).queryPurchasesAsync(params) { result, purchases ->
|
client(activity).queryPurchasesAsync(params) { result, purchases ->
|
||||||
val held = if (result.responseCode == BillingClient.BillingResponseCode.OK) newest(purchases, PREFIX) else null
|
val held = if (result.responseCode == BillingClient.BillingResponseCode.OK) newest(purchases, PREFIX) else null
|
||||||
when {
|
when {
|
||||||
held == null -> launchPurchase(activity, call, id)
|
held?.isAcknowledged == true -> call.resolve(JSObject().put("kind", "subscribed"))
|
||||||
held.isAcknowledged -> call.resolve(JSObject().put("kind", "subscribed"))
|
held != null -> call.resolve(receipt(held).put("kind", "bought"))
|
||||||
else -> call.resolve(receipt(held).put("kind", "bought"))
|
trialRenewalPrice != null && result.responseCode != BillingClient.BillingResponseCode.OK ->
|
||||||
|
call.resolve(JSObject().put("kind", "offer-changed"))
|
||||||
|
purchases.any { p -> p.purchaseState == Purchase.PurchaseState.PENDING && p.products.any { it.startsWith(PREFIX) } } ->
|
||||||
|
call.resolve(JSObject().put("kind", "pending"))
|
||||||
|
else -> launchPurchase(activity, call, id, trialRenewalPrice)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun launchPurchase(activity: Activity, call: PluginCall, id: String) {
|
private fun launchPurchase(activity: Activity, call: PluginCall, id: String, trialRenewalPrice: String?) {
|
||||||
details(activity, listOf(id)) { found ->
|
details(activity, listOf(id)) { found ->
|
||||||
val product = found.firstOrNull()
|
val product = found.firstOrNull()
|
||||||
val offer = product?.let(::baseOffer)
|
val offer = product?.let { listed ->
|
||||||
if (product == null || offer == null) return@details call.resolve(JSObject().put("kind", "failed"))
|
if (trialRenewalPrice == null) baseOffer(listed)
|
||||||
|
else trialOffer(listed)?.takeIf { displayPrice(listed) == trialRenewalPrice }
|
||||||
|
}
|
||||||
|
if (product == null || offer == null) {
|
||||||
|
return@details call.resolve(JSObject().put("kind", if (trialRenewalPrice != null) "offer-changed" else "failed"))
|
||||||
|
}
|
||||||
pendingPurchase?.resolve(JSObject().put("kind", "cancelled"))
|
pendingPurchase?.resolve(JSObject().put("kind", "cancelled"))
|
||||||
pendingPurchase = call
|
pendingPurchase = call
|
||||||
pendingProduct = id
|
pendingProduct = id
|
||||||
@@ -275,6 +324,7 @@ object TrekBilling {
|
|||||||
newest(purchases.filter { !it.isAcknowledged }, prefix)
|
newest(purchases.filter { !it.isAcknowledged }, prefix)
|
||||||
|
|
||||||
private const val PREFIX = "cloud."
|
private const val PREFIX = "cloud."
|
||||||
|
private const val TRIAL_OFFER_ID = "trek-trial-7-days"
|
||||||
|
|
||||||
internal fun newest(purchases: List<Purchase>, prefix: String): Purchase? = purchases
|
internal fun newest(purchases: List<Purchase>, prefix: String): Purchase? = purchases
|
||||||
.filter { p -> p.purchaseState == Purchase.PurchaseState.PURCHASED && p.products.any { it.startsWith(prefix) } }
|
.filter { p -> p.purchaseState == Purchase.PurchaseState.PURCHASED && p.products.any { it.startsWith(prefix) } }
|
||||||
|
|||||||
@@ -688,14 +688,40 @@ extension TrekShellPlugin {
|
|||||||
let ids = call.getArray("ids", String.self) ?? []
|
let ids = call.getArray("ids", String.self) ?? []
|
||||||
Task {
|
Task {
|
||||||
let sandbox = await Self.buysInSandbox()
|
let sandbox = await Self.buysInSandbox()
|
||||||
guard AppStore.canMakePayments, let products = try? await Product.products(for: ids) else {
|
guard !ids.isEmpty, AppStore.canMakePayments, let products = try? await Product.products(for: ids) else {
|
||||||
call.resolve(["products": [], "sandbox": sandbox])
|
call.resolve(["products": [], "sandbox": sandbox])
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
call.resolve(["products": products.map { ["id": $0.id, "displayPrice": $0.displayPrice] }, "sandbox": sandbox])
|
var canStartTrial = false
|
||||||
|
if products.contains(where: Self.hasSevenDayFreeTrial) {
|
||||||
|
canStartTrial = await TrekStore.currentEntitlement(prefix: "cloud.") == nil
|
||||||
|
}
|
||||||
|
var groupEligibility: [String: Bool] = [:]
|
||||||
|
var rows: [[String: Any]] = []
|
||||||
|
for product in products {
|
||||||
|
var freeTrial = false
|
||||||
|
if canStartTrial, Self.hasSevenDayFreeTrial(product), let subscription = product.subscription {
|
||||||
|
let group = subscription.subscriptionGroupID
|
||||||
|
if let cached = groupEligibility[group] {
|
||||||
|
freeTrial = cached
|
||||||
|
} else {
|
||||||
|
freeTrial = await subscription.isEligibleForIntroOffer
|
||||||
|
groupEligibility[group] = freeTrial
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rows.append(["id": product.id, "displayPrice": product.displayPrice, "freeTrial": freeTrial])
|
||||||
|
}
|
||||||
|
call.resolve(["products": rows, "sandbox": sandbox])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static func hasSevenDayFreeTrial(_ product: Product) -> Bool {
|
||||||
|
guard let offer = product.subscription?.introductoryOffer,
|
||||||
|
offer.paymentMode == .freeTrial, offer.price == 0, offer.periodCount == 1 else { return false }
|
||||||
|
return (offer.period.unit == .week && offer.period.value == 1)
|
||||||
|
|| (offer.period.unit == .day && offer.period.value == 7)
|
||||||
|
}
|
||||||
|
|
||||||
/// Whether this build buys in the App Store sandbox: TestFlight, App Review and
|
/// Whether this build buys in the App Store sandbox: TestFlight, App Review and
|
||||||
/// Xcode builds do, and while TREK Cloud's orders are closed only they may buy.
|
/// Xcode builds do, and while TREK Cloud's orders are closed only they may buy.
|
||||||
/// The signed app transaction names its environment; the receipt's file name,
|
/// The signed app transaction names its environment; the receipt's file name,
|
||||||
@@ -726,6 +752,7 @@ extension TrekShellPlugin {
|
|||||||
call.reject("productId is required")
|
call.reject("productId is required")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
let trialRenewalPrice = call.getString("trialRenewalPrice")
|
||||||
Task {
|
Task {
|
||||||
// One subscription per Apple ID: another plan would change it, not add one.
|
// One subscription per Apple ID: another plan would change it, not add one.
|
||||||
// A held one that was delivered stops the purchase here. One that was paid
|
// A held one that was delivered stops the purchase here. One that was paid
|
||||||
@@ -740,9 +767,18 @@ extension TrekShellPlugin {
|
|||||||
}
|
}
|
||||||
do {
|
do {
|
||||||
guard let product = try await Product.products(for: [id]).first else {
|
guard let product = try await Product.products(for: [id]).first else {
|
||||||
call.resolve(["kind": "failed"])
|
call.resolve(["kind": trialRenewalPrice == nil ? "failed" : "offer-changed"])
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if let trialRenewalPrice {
|
||||||
|
guard product.displayPrice == trialRenewalPrice, Self.hasSevenDayFreeTrial(product),
|
||||||
|
let subscription = product.subscription,
|
||||||
|
await subscription.isEligibleForIntroOffer else {
|
||||||
|
call.resolve(["kind": "offer-changed"])
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// StoreKit applies an eligible introductory offer in its purchase sheet.
|
||||||
switch try await product.purchase() {
|
switch try await product.purchase() {
|
||||||
case .success(let verification):
|
case .success(let verification):
|
||||||
guard case .verified(let transaction) = verification else {
|
guard case .verified(let transaction) = verification else {
|
||||||
|
|||||||
+167
-130
@@ -7,8 +7,15 @@ import { PASSWORD_MIN_LENGTH, passwordProblem, passwordRuleStates } from '../../
|
|||||||
import logoWhite from '../public/logo-light.svg'; // #fff wordmark, for the landscape
|
import logoWhite from '../public/logo-light.svg'; // #fff wordmark, for the landscape
|
||||||
import { pageUnderStatusBar } from '../src/native/appBoot';
|
import { pageUnderStatusBar } from '../src/native/appBoot';
|
||||||
import { AUTH_GATE_NAMES, canSignInInApp, type AuthGate } from '../src/native/authGate';
|
import { AUTH_GATE_NAMES, canSignInInApp, type AuthGate } from '../src/native/authGate';
|
||||||
import { isNewCloudPlan, opensSoon, planForUnclaimedPurchase, refundedBeforeOpening } from '../src/native/cloudOrders';
|
import {
|
||||||
import { fakeIapClient, getIapClient, productIdFor, type Purchase } from '../src/native/iap';
|
isNewCloudPlan,
|
||||||
|
matchesPurchaseAgreement,
|
||||||
|
opensSoon,
|
||||||
|
planForUnclaimedPurchase,
|
||||||
|
refundedBeforeOpening,
|
||||||
|
type CloudPurchaseAgreement,
|
||||||
|
} from '../src/native/cloudOrders';
|
||||||
|
import { fakeIapClient, getIapClient, productIdFor, type IapProduct, type Purchase } from '../src/native/iap';
|
||||||
import {
|
import {
|
||||||
APP_STORE_SUBSCRIPTIONS_URL,
|
APP_STORE_SUBSCRIPTIONS_URL,
|
||||||
AUTH_PROXY_DOCS_URL,
|
AUTH_PROXY_DOCS_URL,
|
||||||
@@ -151,12 +158,11 @@ const I = {
|
|||||||
globe: 'M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20M2 12h20M12 2a15 15 0 0 1 0 20 15 15 0 0 1 0-20',
|
globe: 'M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20M2 12h20M12 2a15 15 0 0 1 0 20 15 15 0 0 1 0-20',
|
||||||
image:
|
image:
|
||||||
'M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2zM8.5 10a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zM21 15l-5-5L5 21',
|
'M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2zM8.5 10a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zM21 15l-5-5L5 21',
|
||||||
spark: 'M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8z',
|
|
||||||
mail: 'M4 5h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2zM3 7l9 6 9-6',
|
|
||||||
people:
|
people:
|
||||||
'M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM22 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75',
|
'M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM22 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75',
|
||||||
shield: 'M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10',
|
shield: 'M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10',
|
||||||
check: 'M20 6 9 17l-5-5',
|
check: 'M20 6 9 17l-5-5',
|
||||||
|
cross: 'M6 6l12 12M18 6 6 18',
|
||||||
lock: 'M6 11h12a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2zM8 11V8a4 4 0 0 1 8 0v3',
|
lock: 'M6 11h12a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2zM8 11V8a4 4 0 0 1 8 0v3',
|
||||||
key: 'M7.5 20a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9zM10.7 12.3 21 2M16 7l3 3M14 9l2 2',
|
key: 'M7.5 20a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9zM10.7 12.3 21 2M16 7l3 3M14 9l2 2',
|
||||||
alert: 'M12 21.5a9.5 9.5 0 1 0 0-19 9.5 9.5 0 0 0 0 19zM12 7.5v5.5M12 16.5h.01',
|
alert: 'M12 21.5a9.5 9.5 0 1 0 0-19 9.5 9.5 0 0 0 0 19zM12 7.5v5.5M12 16.5h.01',
|
||||||
@@ -315,7 +321,8 @@ function showWelcome(opts: { back?: boolean } = {}): void {
|
|||||||
const perk = (glyph: string, title: string, sub: string) =>
|
const perk = (glyph: string, title: string, sub: string) =>
|
||||||
el('div', {}, el('i', {}, icon(glyph, 17)), el('span', {}, el('b', {}, title), el('small', {}, sub)));
|
el('div', {}, el('i', {}, icon(glyph, 17)), el('span', {}, el('b', {}, title), el('small', {}, sub)));
|
||||||
|
|
||||||
const discover = el('button', { type: 'button', className: 'cta' }, t('native.welcome.discover'));
|
const trial = el('span', { className: 'trial-badge', hidden: true }, t('native.trial.badge'));
|
||||||
|
const discover = el('button', { type: 'button', className: 'cta discover' }, t('native.welcome.discover'), trial);
|
||||||
discover.addEventListener('click', () => {
|
discover.addEventListener('click', () => {
|
||||||
void tap();
|
void tap();
|
||||||
showPlans();
|
showPlans();
|
||||||
@@ -326,7 +333,7 @@ function showWelcome(opts: { back?: boolean } = {}): void {
|
|||||||
showConnect();
|
showConnect();
|
||||||
});
|
});
|
||||||
|
|
||||||
show(
|
const screen = show(
|
||||||
'welcome',
|
'welcome',
|
||||||
WELCOME_CAMERA,
|
WELCOME_CAMERA,
|
||||||
{
|
{
|
||||||
@@ -351,6 +358,9 @@ function showWelcome(opts: { back?: boolean } = {}): void {
|
|||||||
},
|
},
|
||||||
opts
|
opts
|
||||||
);
|
);
|
||||||
|
void availableWelcomeTrial().then((available) => {
|
||||||
|
if (screen.node.isConnected) trial.hidden = !available;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// ── Connect (address) ───────────────────────────────────────────────────────
|
// ── Connect (address) ───────────────────────────────────────────────────────
|
||||||
@@ -664,7 +674,7 @@ interface CloudPlan {
|
|||||||
yearlyCents?: number;
|
yearlyCents?: number;
|
||||||
currency?: 'EUR' | 'USD';
|
currency?: 'EUR' | 'USD';
|
||||||
aiDocuments: number;
|
aiDocuments: number;
|
||||||
aiDocumentLimit?: 0 | null;
|
aiDocumentLimit?: number | null;
|
||||||
aiAssistant?: 'planned' | 'included' | 'unavailable';
|
aiAssistant?: 'planned' | 'included' | 'unavailable';
|
||||||
bookingMailImport?: boolean;
|
bookingMailImport?: boolean;
|
||||||
storageGb: number;
|
storageGb: number;
|
||||||
@@ -681,24 +691,24 @@ const SAMPLE_PLANS: CloudPlan[] = [
|
|||||||
{
|
{
|
||||||
id: 'start',
|
id: 'start',
|
||||||
name: 'Start',
|
name: 'Start',
|
||||||
monthlyCents: 499,
|
monthlyCents: 599,
|
||||||
yearlyCents: 4899,
|
yearlyCents: 4899,
|
||||||
currency: 'USD',
|
currency: 'USD',
|
||||||
aiDocuments: 0,
|
aiDocuments: 0,
|
||||||
aiDocumentLimit: 0,
|
aiDocumentLimit: 0,
|
||||||
storageGb: 200,
|
storageGb: 50,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'plus',
|
id: 'plus',
|
||||||
name: 'Plus',
|
name: 'Plus',
|
||||||
monthlyCents: 999,
|
monthlyCents: 1199,
|
||||||
yearlyCents: 9900,
|
yearlyCents: 9900,
|
||||||
currency: 'USD',
|
currency: 'USD',
|
||||||
aiDocuments: 100,
|
aiDocuments: 100,
|
||||||
aiDocumentLimit: null,
|
aiDocumentLimit: null,
|
||||||
aiAssistant: 'planned',
|
aiAssistant: 'included',
|
||||||
bookingMailImport: true,
|
bookingMailImport: true,
|
||||||
storageGb: 200,
|
storageGb: 50,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -706,6 +716,8 @@ interface CloudPlans {
|
|||||||
plans: CloudPlan[];
|
plans: CloudPlan[];
|
||||||
/** Orders are closed: only a test build may buy, and the store charges it nothing. */
|
/** Orders are closed: only a test build may buy, and the store charges it nothing. */
|
||||||
closed: boolean;
|
closed: boolean;
|
||||||
|
/** Only the live catalogue's explicit opening permits customer trial advertising. */
|
||||||
|
open?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function fetchPlans(): Promise<CloudPlans | null> {
|
async function fetchPlans(): Promise<CloudPlans | null> {
|
||||||
@@ -714,7 +726,8 @@ async function fetchPlans(): Promise<CloudPlans | null> {
|
|||||||
const data = typeof res.data === 'string' ? JSON.parse(res.data) : res.data;
|
const data = typeof res.data === 'string' ? JSON.parse(res.data) : res.data;
|
||||||
const body = (data ?? {}) as { plans?: CloudPlan[]; ordering?: string };
|
const body = (data ?? {}) as { plans?: CloudPlan[]; ordering?: string };
|
||||||
const plans = Array.isArray(body.plans) ? body.plans.filter((plan) => isNewCloudPlan(plan.id)) : [];
|
const plans = Array.isArray(body.plans) ? body.plans.filter((plan) => isNewCloudPlan(plan.id)) : [];
|
||||||
if (plans.length) return { plans, closed: body.ordering === 'closed' };
|
if (plans.length)
|
||||||
|
return { plans, closed: body.ordering === 'closed', open: res.status === 200 && body.ordering === 'open' };
|
||||||
} catch {
|
} catch {
|
||||||
// Fall through to the preview fallback.
|
// Fall through to the preview fallback.
|
||||||
}
|
}
|
||||||
@@ -730,22 +743,44 @@ async function fetchPlans(): Promise<CloudPlans | null> {
|
|||||||
*/
|
*/
|
||||||
interface Offer {
|
interface Offer {
|
||||||
canBuy: boolean;
|
canBuy: boolean;
|
||||||
storePrices: Map<string, string> | null;
|
storeProducts: Map<string, IapProduct> | null;
|
||||||
|
canShowTrial: boolean;
|
||||||
/** Orders are closed and this is no test build: the plans show, nothing is for sale yet. */
|
/** Orders are closed and this is no test build: the plans show, nothing is for sale yet. */
|
||||||
opensSoon: boolean;
|
opensSoon: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
function offerFor(offer: Offer, plan: CloudPlan, interval: 'month' | 'year'): { label: string; buyable: boolean } {
|
function offerFor(
|
||||||
if (!offer.canBuy) return { label: '', buyable: false };
|
offer: Offer,
|
||||||
|
plan: CloudPlan,
|
||||||
|
interval: 'month' | 'year'
|
||||||
|
): { label: string; buyable: boolean; freeTrial: boolean } {
|
||||||
|
if (!offer.canBuy) return { label: '', buyable: false, freeTrial: false };
|
||||||
if (iap !== fakeIapClient) {
|
if (iap !== fakeIapClient) {
|
||||||
const label = offer.storePrices?.get(productIdFor(plan.id, interval)) ?? '';
|
const product = offer.storeProducts?.get(productIdFor(plan.id, interval));
|
||||||
return { label, buyable: label !== '' };
|
const label = product?.displayPrice ?? '';
|
||||||
|
return {
|
||||||
|
label,
|
||||||
|
buyable: label !== '',
|
||||||
|
freeTrial: label !== '' && offer.canShowTrial && product?.freeTrial === true,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
const cents = interval === 'year' ? plan.yearlyCents : plan.monthlyCents;
|
const cents = interval === 'year' ? plan.yearlyCents : plan.monthlyCents;
|
||||||
const currency = plan.currency ?? 'EUR';
|
const currency = plan.currency ?? 'EUR';
|
||||||
const label =
|
const label =
|
||||||
typeof cents === 'number' ? new Intl.NumberFormat(locale, { style: 'currency', currency }).format(cents / 100) : '';
|
typeof cents === 'number' ? new Intl.NumberFormat(locale, { style: 'currency', currency }).format(cents / 100) : '';
|
||||||
return { label, buyable: label !== '' };
|
return { label, buyable: label !== '', freeTrial: false };
|
||||||
|
}
|
||||||
|
|
||||||
|
function storeIds(plans: CloudPlan[]): string[] {
|
||||||
|
return plans.flatMap((p) => [productIdFor(p.id, 'month'), productIdFor(p.id, 'year')]);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function availableWelcomeTrial(): Promise<boolean> {
|
||||||
|
if (iap === fakeIapClient || !(await iapReady)) return false;
|
||||||
|
const list = await fetchPlans();
|
||||||
|
if (!list?.open) return false;
|
||||||
|
const products = await iap.products(storeIds(list.plans));
|
||||||
|
return Array.from(products.values()).some((product) => product.freeTrial && product.displayPrice !== '');
|
||||||
}
|
}
|
||||||
|
|
||||||
async function loadOffer(list: CloudPlans): Promise<Offer> {
|
async function loadOffer(list: CloudPlans): Promise<Offer> {
|
||||||
@@ -755,39 +790,61 @@ async function loadOffer(list: CloudPlans): Promise<Offer> {
|
|||||||
const sandbox = list.closed && !onPlay ? await iap.isSandbox().catch(() => false) : false;
|
const sandbox = list.closed && !onPlay ? await iap.isSandbox().catch(() => false) : false;
|
||||||
const soon = opensSoon({ available, closed: list.closed, sandbox, onPlay });
|
const soon = opensSoon({ available, closed: list.closed, sandbox, onPlay });
|
||||||
const canBuy = available && !soon;
|
const canBuy = available && !soon;
|
||||||
if (!canBuy || iap === fakeIapClient) return { canBuy, storePrices: null, opensSoon: soon };
|
if (!canBuy || iap === fakeIapClient) return { canBuy, storeProducts: null, canShowTrial: false, opensSoon: soon };
|
||||||
const ids = list.plans.flatMap((p) => [productIdFor(p.id, 'month'), productIdFor(p.id, 'year')]);
|
return {
|
||||||
return { canBuy, storePrices: await iap.prices(ids), opensSoon: soon };
|
canBuy,
|
||||||
|
storeProducts: await iap.products(storeIds(list.plans)),
|
||||||
|
canShowTrial: list.open === true,
|
||||||
|
opensSoon: soon,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/** The plan the picker starts on and marks: the smallest one with AI documents, the one most trips want. */
|
function planFeatures(plan: CloudPlan): HTMLLIElement[] {
|
||||||
function recommendedPlan(plans: CloudPlan[]): CloudPlan | undefined {
|
const row = (label: string, value: string, glyph: string, unavailable = false) =>
|
||||||
return plans.find((p) => p.aiDocuments > 0) ?? plans[0];
|
el(
|
||||||
}
|
'li',
|
||||||
|
{ className: unavailable ? 'spec off' : 'spec' },
|
||||||
|
el('i', {}, icon(glyph, 16)),
|
||||||
|
el('b', {}, label),
|
||||||
|
el('bdi', {}, value)
|
||||||
|
);
|
||||||
|
const feature = (label: string, included: boolean) =>
|
||||||
|
row(
|
||||||
|
label,
|
||||||
|
t(included ? 'native.plans.included' : 'native.plans.notIncluded'),
|
||||||
|
included ? I.check : I.cross,
|
||||||
|
!included
|
||||||
|
);
|
||||||
|
|
||||||
/** The kind of trip each plan is for: a weekend away, a round trip, a long journey, the whole world. */
|
const storage = plan.storageGb >= 1000 ? `${count(plan.storageGb / 1000)} TB` : `${count(plan.storageGb)} GB`;
|
||||||
const TRIPS: Record<string, { titleKey: string; textKey: string }> = {
|
const aiDocuments = plan.aiDocumentLimit === null || (plan.aiDocumentLimit ?? plan.aiDocuments) > 0;
|
||||||
start: { titleKey: 'native.trip.start.title', textKey: 'native.trip.start.text' },
|
return [
|
||||||
basis: { titleKey: 'native.trip.basis.title', textKey: 'native.trip.basis.text' },
|
row(t('native.plans.storage'), storage, I.image),
|
||||||
plus: { titleKey: 'native.trip.plus.title', textKey: 'native.trip.plus.text' },
|
feature(t('native.plans.aiLabel'), aiDocuments),
|
||||||
pro: { titleKey: 'native.trip.pro.title', textKey: 'native.trip.pro.text' },
|
feature(t('native.plans.assistant'), plan.aiAssistant === 'included'),
|
||||||
};
|
feature(t('native.plans.mailImport'), plan.bookingMailImport === true),
|
||||||
/** A plan's trip, its title and one line; a plan the app does not know keeps its own name. */
|
row(t('native.plans.unlimitedSub'), t('native.plans.unlimited'), I.people),
|
||||||
function tripOf(plan: CloudPlan): { title: string; text: string } {
|
];
|
||||||
const trip = TRIPS[plan.id];
|
|
||||||
return trip ? { title: t(trip.titleKey), text: t(trip.textKey) } : { title: plan.name, text: '' };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function per(interval: 'month' | 'year'): string {
|
function per(interval: 'month' | 'year'): string {
|
||||||
return interval === 'year' ? t('native.plans.perYear') : t('native.plans.perMonth');
|
return interval === 'year' ? t('native.plans.perYear') : t('native.plans.perMonth');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function trialPrice(price: string, interval: 'month' | 'year'): string {
|
||||||
|
return t('native.trial.price', { price, period: per(interval) });
|
||||||
|
}
|
||||||
|
|
||||||
|
function trialCancellation(): string {
|
||||||
|
return t(onPlay ? 'native.trial.cancelPlay' : 'native.trial.cancelApple');
|
||||||
|
}
|
||||||
|
|
||||||
/** The restore button of the plans on screen, which redeems a payment that cleared later. */
|
/** The restore button of the plans on screen, which redeems a payment that cleared later. */
|
||||||
let resumeRestore: (() => void) | null = null;
|
let resumeRestore: (() => void) | null = null;
|
||||||
let watchingTransactions = false;
|
let watchingTransactions = false;
|
||||||
/** Where the camera stood on the plan chosen last, for the screens that follow it. */
|
/** Where the camera stood on the plan chosen last, for the screens that follow it. */
|
||||||
let chosenCamera: Camera = cameraForPlan(1);
|
let chosenCamera: Camera = cameraForPlan(1);
|
||||||
/** The plan chosen last, so coming back to the plans finds it still chosen. */
|
/** Restore a choice when returning from setup. A fresh entry opens Plus. */
|
||||||
let chosenPlanId: string | null = null;
|
let chosenPlanId: string | null = null;
|
||||||
let chosenInterval: 'month' | 'year' = 'month';
|
let chosenInterval: 'month' | 'year' = 'month';
|
||||||
|
|
||||||
@@ -852,14 +909,11 @@ function restoreButton(plans: CloudPlan[]): HTMLButtonElement {
|
|||||||
function showPlans(opts: { back?: boolean } = {}): void {
|
function showPlans(opts: { back?: boolean } = {}): void {
|
||||||
let interval: 'month' | 'year' = chosenInterval;
|
let interval: 'month' | 'year' = chosenInterval;
|
||||||
let plans: CloudPlan[] = [];
|
let plans: CloudPlan[] = [];
|
||||||
let offer: Offer = { canBuy: false, storePrices: null, opensSoon: false };
|
let offer: Offer = { canBuy: false, storeProducts: null, canShowTrial: false, opensSoon: false };
|
||||||
let selectedId: string | null = null;
|
let selectedId: string | null = null;
|
||||||
|
|
||||||
const tiers = el('div', { className: 'tiers', role: 'radiogroup', hidden: true });
|
const tiers = el('div', { className: 'tiers', role: 'radiogroup', hidden: true });
|
||||||
tiers.setAttribute('aria-label', t('native.plans.title'));
|
tiers.setAttribute('aria-label', t('native.plans.title'));
|
||||||
const title = el('h1', {});
|
|
||||||
const text = el('p', {});
|
|
||||||
const trip = el('div', { className: 'trip' }, title, text);
|
|
||||||
|
|
||||||
const monthBtn = el('button', { type: 'button', role: 'radio' }, t('native.plans.monthly'));
|
const monthBtn = el('button', { type: 'button', role: 'radio' }, t('native.plans.monthly'));
|
||||||
const yearBtn = el('button', { type: 'button', role: 'radio' }, t('native.plans.yearly'));
|
const yearBtn = el('button', { type: 'button', role: 'radio' }, t('native.plans.yearly'));
|
||||||
@@ -876,18 +930,20 @@ function showPlans(opts: { back?: boolean } = {}): void {
|
|||||||
const pricePer = el('span', {});
|
const pricePer = el('span', {});
|
||||||
const price = el('div', { className: 'price' }, priceValue, pricePer);
|
const price = el('div', { className: 'price' }, priceValue, pricePer);
|
||||||
const equals = el('div', { className: 'equals' });
|
const equals = el('div', { className: 'equals' });
|
||||||
const pricebox = el('div', { className: 'pricebox' }, cycle, price, equals);
|
const trial = el('p', { className: 'trial-price', hidden: true });
|
||||||
const specs = el('div', { className: 'specs' });
|
const pricebox = el('div', { className: 'pricebox' }, cycle, price, equals, trial);
|
||||||
|
const specs = el('ul', { className: 'specs', role: 'list' });
|
||||||
const foot = el('div', { className: 'pad', hidden: true });
|
const foot = el('div', { className: 'pad', hidden: true });
|
||||||
|
const legal = el('p', { className: 'legal' });
|
||||||
|
|
||||||
const loading = el('div', { className: 'loading' }, el('span', { className: 'spin' }));
|
const loading = el('div', { className: 'loading' }, el('span', { className: 'spin' }));
|
||||||
const details = el('div', { className: 'stack', hidden: true }, trip, pricebox, specs);
|
const details = el('div', { className: 'stack', hidden: true }, pricebox, specs);
|
||||||
const choose = el('button', { type: 'button', className: 'cta', hidden: true });
|
const choose = el('button', { type: 'button', className: 'cta', hidden: true });
|
||||||
const dock = el('div', { className: 'dock' }, choose);
|
const dock = el('div', { className: 'dock' }, choose);
|
||||||
|
|
||||||
const screen = show(
|
const screen = show(
|
||||||
'plain',
|
'plain',
|
||||||
chosenCamera,
|
opts.back ? chosenCamera : cameraForPlan(1),
|
||||||
{
|
{
|
||||||
back: () => showWelcome({ back: true }),
|
back: () => showWelcome({ back: true }),
|
||||||
content: [el('div', { className: 'pad lift' }, tiers, loading, details), foot, dock],
|
content: [el('div', { className: 'pad lift' }, tiers, loading, details), foot, dock],
|
||||||
@@ -934,20 +990,11 @@ function showPlans(opts: { back?: boolean } = {}): void {
|
|||||||
yearBtn.setAttribute('aria-checked', String(interval === 'year'));
|
yearBtn.setAttribute('aria-checked', String(interval === 'year'));
|
||||||
cycle.dataset.year = String(interval === 'year');
|
cycle.dataset.year = String(interval === 'year');
|
||||||
|
|
||||||
const { title: tripTitle, text: tripText } = tripOf(plan);
|
const { label, buyable, freeTrial } = interval === 'month' ? month : year;
|
||||||
const recommended = recommendedPlan(plans)?.id === plan.id;
|
// An introductory offer states the free period and renewal price together.
|
||||||
title.replaceChildren(
|
price.hidden = !label || freeTrial;
|
||||||
tripTitle,
|
|
||||||
...(recommended ? [el('span', { className: 'badge' }, t('native.plans.recommended'))] : [])
|
|
||||||
);
|
|
||||||
text.textContent = tripText;
|
|
||||||
text.hidden = !tripText;
|
|
||||||
|
|
||||||
const { label, buyable } = interval === 'month' ? month : year;
|
|
||||||
// No price yet (orders not open): the plan shows without one rather than with an empty one.
|
|
||||||
price.hidden = !label;
|
|
||||||
pricePer.textContent = per(interval);
|
pricePer.textContent = per(interval);
|
||||||
if (label) paintPrice(label, animate);
|
if (label && !freeTrial) paintPrice(label, animate);
|
||||||
|
|
||||||
// Without a price in either period (orders not open yet) the switch would choose between nothing.
|
// Without a price in either period (orders not open yet) the switch would choose between nothing.
|
||||||
pricebox.hidden = !month.label && !year.label;
|
pricebox.hidden = !month.label && !year.label;
|
||||||
@@ -955,59 +1002,23 @@ function showPlans(opts: { back?: boolean } = {}): void {
|
|||||||
yearBtn.disabled = !year.label;
|
yearBtn.disabled = !year.label;
|
||||||
const yearAmount = amountIn(year.label);
|
const yearAmount = amountIn(year.label);
|
||||||
equals.textContent =
|
equals.textContent =
|
||||||
!label || !year.label
|
!label || !year.label || freeTrial
|
||||||
? ''
|
? ''
|
||||||
: interval === 'month'
|
: interval === 'month'
|
||||||
? t('native.plans.yearlyIs', { price: year.label })
|
? t('native.plans.yearlyIs', { price: year.label })
|
||||||
: yearAmount
|
: yearAmount
|
||||||
? t('native.plans.monthlyIs', { price: yearAmount.render(yearAmount.value / 12) })
|
? t('native.plans.monthlyIs', { price: yearAmount.render(yearAmount.value / 12) })
|
||||||
: '';
|
: '';
|
||||||
|
trial.hidden = !freeTrial;
|
||||||
|
trial.textContent = freeTrial ? trialPrice(label, interval) : '';
|
||||||
|
legal.textContent = freeTrial
|
||||||
|
? trialCancellation()
|
||||||
|
: t(onPlay ? 'native.plans.legalAndroid' : 'native.plans.legal');
|
||||||
|
|
||||||
const gb = plan.storageGb >= 1000 ? `${count(plan.storageGb / 1000)} TB` : `${count(plan.storageGb)} GB`;
|
specs.replaceChildren(...planFeatures(plan));
|
||||||
const notIncluded = t('native.plans.aiNone');
|
|
||||||
const included = t('native.plans.included');
|
|
||||||
const assistant = plan.aiAssistant === 'included';
|
|
||||||
const tile = (glyph: string, big: string, small: string, off = false) =>
|
|
||||||
el(
|
|
||||||
'span',
|
|
||||||
{ className: off ? 'spec off' : 'spec' },
|
|
||||||
el('i', {}, icon(glyph, 17)),
|
|
||||||
el('span', {}, el('b', {}, big), el('small', {}, small))
|
|
||||||
);
|
|
||||||
specs.replaceChildren(
|
|
||||||
tile(I.image, gb, t('native.plans.storageFairUse')),
|
|
||||||
plan.aiDocuments > 0
|
|
||||||
? tile(
|
|
||||||
I.spark,
|
|
||||||
plan.aiDocumentLimit === null
|
|
||||||
? t('native.plans.unlimited')
|
|
||||||
: t('native.plans.aiPerMonth', { n: count(plan.aiDocuments) }),
|
|
||||||
t('native.plans.aiLabel')
|
|
||||||
)
|
|
||||||
: tile(I.spark, notIncluded, t('native.plans.aiLabel'), true),
|
|
||||||
tile(
|
|
||||||
I.spark,
|
|
||||||
assistant ? included : plan.aiAssistant === 'planned' ? t('native.plans.planned') : notIncluded,
|
|
||||||
t('native.plans.assistant'),
|
|
||||||
!assistant
|
|
||||||
),
|
|
||||||
tile(
|
|
||||||
I.mail,
|
|
||||||
plan.bookingMailImport ? included : notIncluded,
|
|
||||||
t('native.plans.mailImport'),
|
|
||||||
!plan.bookingMailImport
|
|
||||||
),
|
|
||||||
el(
|
|
||||||
'span',
|
|
||||||
{ className: 'spec wide' },
|
|
||||||
el('i', {}, icon(I.people, 17)),
|
|
||||||
el('span', {}, el('b', {}, t('native.plans.unlimited')), el('small', {}, t('native.plans.unlimitedSub'))),
|
|
||||||
el('em', {}, t('native.plans.inEveryPlan'))
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
choose.hidden = !buyable;
|
choose.hidden = !buyable;
|
||||||
choose.textContent = t('native.plans.choose', { trip: tripTitle });
|
choose.textContent = t('native.plans.choose', { plan: plan.name });
|
||||||
chosenCamera = cameraForPlan(index);
|
chosenCamera = cameraForPlan(index);
|
||||||
chosenPlanId = plan.id;
|
chosenPlanId = plan.id;
|
||||||
chosenInterval = interval;
|
chosenInterval = interval;
|
||||||
@@ -1042,7 +1053,7 @@ function showPlans(opts: { back?: boolean } = {}): void {
|
|||||||
showSubscribed();
|
showSubscribed();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
showClaim(plan, selectedInterval, price.label);
|
showClaim(plan, selectedInterval, price.label, { freeTrial: price.freeTrial });
|
||||||
});
|
});
|
||||||
|
|
||||||
const load = async () => {
|
const load = async () => {
|
||||||
@@ -1060,7 +1071,9 @@ function showPlans(opts: { back?: boolean } = {}): void {
|
|||||||
}
|
}
|
||||||
offer = await loadOffer(list);
|
offer = await loadOffer(list);
|
||||||
plans = list.plans;
|
plans = list.plans;
|
||||||
selectedId = plans.find((p) => p.id === chosenPlanId)?.id ?? recommendedPlan(plans)?.id ?? null;
|
const previousId = opts.back ? chosenPlanId : null;
|
||||||
|
selectedId =
|
||||||
|
plans.find((p) => p.id === previousId)?.id ?? plans.find((p) => p.id === 'plus')?.id ?? plans[0]?.id ?? null;
|
||||||
tiers.replaceChildren(
|
tiers.replaceChildren(
|
||||||
...plans.map((p) => {
|
...plans.map((p) => {
|
||||||
const b = el('button', { type: 'button', role: 'radio', dataset: { plan: p.id } }, p.name);
|
const b = el('button', { type: 'button', role: 'radio', dataset: { plan: p.id } }, p.name);
|
||||||
@@ -1083,7 +1096,7 @@ function showPlans(opts: { back?: boolean } = {}): void {
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
foot.replaceChildren(
|
foot.replaceChildren(
|
||||||
el('p', { className: 'legal' }, t(onPlay ? 'native.plans.legalAndroid' : 'native.plans.legal')),
|
legal,
|
||||||
el(
|
el(
|
||||||
'div',
|
'div',
|
||||||
{ className: 'legal-links' },
|
{ className: 'legal-links' },
|
||||||
@@ -1120,11 +1133,7 @@ async function slugStatus(slug: string): Promise<SlugStatus> {
|
|||||||
* (terms § 2 (1a), § 327h BGB), as the control plane words and versions it. The
|
* (terms § 2 (1a), § 327h BGB), as the control plane words and versions it. The
|
||||||
* app shows the server's text, never its own, and sends back the version it showed.
|
* app shows the server's text, never its own, and sends back the version it showed.
|
||||||
*/
|
*/
|
||||||
interface DeviationsConsent {
|
async function fetchConsent(): Promise<CloudPurchaseAgreement | null> {
|
||||||
version: string;
|
|
||||||
text: string;
|
|
||||||
}
|
|
||||||
async function fetchConsent(): Promise<DeviationsConsent | null> {
|
|
||||||
try {
|
try {
|
||||||
const res = await CapacitorHttp.get({
|
const res = await CapacitorHttp.get({
|
||||||
url: `${CLOUD_URL}/api/iap/consent`,
|
url: `${CLOUD_URL}/api/iap/consent`,
|
||||||
@@ -1195,7 +1204,7 @@ function showClaim(
|
|||||||
plan: Pick<CloudPlan, 'id' | 'name'>,
|
plan: Pick<CloudPlan, 'id' | 'name'>,
|
||||||
interval: 'month' | 'year',
|
interval: 'month' | 'year',
|
||||||
priceLabel: string,
|
priceLabel: string,
|
||||||
opts: { back?: boolean; bought?: Purchase } = {}
|
opts: { back?: boolean; bought?: Purchase; freeTrial?: boolean } = {}
|
||||||
): void {
|
): void {
|
||||||
/** A purchase that went through but whose redeem did not: a retry redeems it again instead of buying twice. */
|
/** A purchase that went through but whose redeem did not: a retry redeems it again instead of buying twice. */
|
||||||
let bought: Purchase | null = opts.bought ?? null;
|
let bought: Purchase | null = opts.bought ?? null;
|
||||||
@@ -1279,7 +1288,7 @@ function showClaim(
|
|||||||
};
|
};
|
||||||
|
|
||||||
// The § 327h agreement, asked on its own before anything is bought.
|
// The § 327h agreement, asked on its own before anything is bought.
|
||||||
let consent: DeviationsConsent | null = null;
|
let consent: CloudPurchaseAgreement | null = null;
|
||||||
const consentBox = el('input', { type: 'checkbox' });
|
const consentBox = el('input', { type: 'checkbox' });
|
||||||
const consentText = el('span', { className: 'consent-text' }, t('native.claim.consentLoading'));
|
const consentText = el('span', { className: 'consent-text' }, t('native.claim.consentLoading'));
|
||||||
const consentField = el(
|
const consentField = el(
|
||||||
@@ -1288,19 +1297,26 @@ function showClaim(
|
|||||||
consentBox,
|
consentBox,
|
||||||
el('span', {}, el('strong', {}, t('native.claim.consentTitle')), consentText)
|
el('span', {}, el('strong', {}, t('native.claim.consentTitle')), consentText)
|
||||||
);
|
);
|
||||||
const loadConsent = async (): Promise<DeviationsConsent | null> => {
|
const showConsent = (current: CloudPurchaseAgreement | null): void => {
|
||||||
|
consent = current;
|
||||||
consentBox.checked = false;
|
consentBox.checked = false;
|
||||||
consentBox.disabled = true;
|
|
||||||
consentText.textContent = t('native.claim.consentLoading');
|
|
||||||
consent = await fetchConsent();
|
|
||||||
consentBox.disabled = consent === null;
|
consentBox.disabled = consent === null;
|
||||||
consentText.textContent = consent ? consent.text : t('native.claim.consentUnavailable');
|
consentText.textContent = consent ? consent.text : t('native.claim.consentUnavailable');
|
||||||
|
};
|
||||||
|
const loadConsent = async (): Promise<CloudPurchaseAgreement | null> => {
|
||||||
|
consentBox.disabled = true;
|
||||||
|
consentText.textContent = t('native.claim.consentLoading');
|
||||||
|
showConsent(await fetchConsent());
|
||||||
return consent;
|
return consent;
|
||||||
};
|
};
|
||||||
void loadConsent();
|
void loadConsent();
|
||||||
|
|
||||||
const subscribeLabel = () =>
|
const subscribeLabel = () =>
|
||||||
bought ? t('native.claim.completeSetup') : t('native.claim.subscribe', { price: priceLabel });
|
bought
|
||||||
|
? t('native.claim.completeSetup')
|
||||||
|
: opts.freeTrial
|
||||||
|
? t('native.trial.badge')
|
||||||
|
: t('native.claim.subscribe', { price: priceLabel });
|
||||||
const submit = el('button', { type: 'button', className: 'cta' }, subscribeLabel());
|
const submit = el('button', { type: 'button', className: 'cta' }, subscribeLabel());
|
||||||
// What is about to be bought, so nobody pays for a plan they did not mean.
|
// What is about to be bought, so nobody pays for a plan they did not mean.
|
||||||
const change = el('button', { type: 'button' }, t('native.claim.change'));
|
const change = el('button', { type: 'button' }, t('native.claim.change'));
|
||||||
@@ -1308,19 +1324,25 @@ function showClaim(
|
|||||||
void tap();
|
void tap();
|
||||||
showPlans({ back: true });
|
showPlans({ back: true });
|
||||||
});
|
});
|
||||||
|
const planPrice = !priceLabel
|
||||||
|
? null
|
||||||
|
: opts.freeTrial
|
||||||
|
? el('small', {}, trialPrice(priceLabel, interval))
|
||||||
|
: el('small', { dir: 'ltr' }, `${priceLabel} ${per(interval)}`);
|
||||||
const planRow = el(
|
const planRow = el(
|
||||||
'div',
|
'div',
|
||||||
{ className: 'plan-row' },
|
{ className: 'plan-row' },
|
||||||
el(
|
el('span', {}, el('b', {}, plan.name), ...(planPrice ? [planPrice] : [])),
|
||||||
'span',
|
|
||||||
{},
|
|
||||||
el('b', {}, plan.name),
|
|
||||||
...(priceLabel ? [el('small', { dir: 'ltr' }, `${priceLabel} ${per(interval)}`)] : [])
|
|
||||||
),
|
|
||||||
// A purchase already made is not a choice any more.
|
// A purchase already made is not a choice any more.
|
||||||
...(bought ? [] : [change])
|
...(bought ? [] : [change])
|
||||||
);
|
);
|
||||||
const error = notice('');
|
const error = notice('');
|
||||||
|
const checkoutDock = el(
|
||||||
|
'div',
|
||||||
|
{ className: 'dock' },
|
||||||
|
submit,
|
||||||
|
el('p', { className: 'fine' }, opts.freeTrial ? trialCancellation() : t('native.claim.renews'))
|
||||||
|
);
|
||||||
const form = el(
|
const form = el(
|
||||||
'form',
|
'form',
|
||||||
{ className: 'pad form', noValidate: true },
|
{ className: 'pad form', noValidate: true },
|
||||||
@@ -1347,10 +1369,7 @@ function showClaim(
|
|||||||
{
|
{
|
||||||
back: () => showPlans({ back: true }),
|
back: () => showPlans({ back: true }),
|
||||||
overlay: [card.node],
|
overlay: [card.node],
|
||||||
content: [
|
content: [form, checkoutDock],
|
||||||
form,
|
|
||||||
el('div', { className: 'dock' }, submit, el('p', { className: 'fine' }, t('native.claim.renews'))),
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
opts
|
opts
|
||||||
);
|
);
|
||||||
@@ -1440,7 +1459,8 @@ function showClaim(
|
|||||||
consentBox.focus();
|
consentBox.focus();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const consentVersion = consent ? consent.version : null;
|
const acceptedConsent = consent;
|
||||||
|
const consentVersion = acceptedConsent?.version ?? null;
|
||||||
|
|
||||||
void tap(ImpactStyle.Medium);
|
void tap(ImpactStyle.Medium);
|
||||||
// The purchase sheet and the progress want the whole screen, not the keyboard.
|
// The purchase sheet and the progress want the whole screen, not the keyboard.
|
||||||
@@ -1460,7 +1480,24 @@ function showClaim(
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (!bought) {
|
if (!bought) {
|
||||||
const outcome = await iap.purchase(productIdFor(plan.id, interval));
|
const currentConsent = await fetchConsent();
|
||||||
|
if (!form.isConnected) return;
|
||||||
|
if (!matchesPurchaseAgreement(acceptedConsent, currentConsent)) {
|
||||||
|
restore();
|
||||||
|
showConsent(currentConsent);
|
||||||
|
setNotice(error, t(currentConsent ? 'native.claim.consentRequired' : 'native.claim.consentUnavailable'));
|
||||||
|
if (currentConsent) consentBox.focus();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const trialRenewalPrice = opts.freeTrial ? priceLabel : undefined;
|
||||||
|
const outcome = await iap.purchase(productIdFor(plan.id, interval), trialRenewalPrice);
|
||||||
|
if (outcome.kind === 'offer-changed') {
|
||||||
|
restore();
|
||||||
|
planPrice?.remove();
|
||||||
|
checkoutDock.hidden = true;
|
||||||
|
setNotice(error, t('native.trial.changed'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (outcome.kind === 'cancelled') {
|
if (outcome.kind === 'cancelled') {
|
||||||
restore();
|
restore();
|
||||||
setNotice(error, t('native.claim.cancelled'));
|
setNotice(error, t('native.claim.cancelled'));
|
||||||
|
|||||||
@@ -320,14 +320,14 @@ input {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: var(--sea);
|
background: var(--sea);
|
||||||
margin-bottom: -1px;
|
margin-bottom: -1px;
|
||||||
height: min(300px, 36svh);
|
height: max(calc(var(--safe-top) + 68px), min(252px, 30svh));
|
||||||
}
|
}
|
||||||
.hero.tall {
|
.hero.tall {
|
||||||
height: min(320px, 38svh);
|
height: min(320px, 38svh);
|
||||||
}
|
}
|
||||||
.hero.welcome {
|
.hero.welcome {
|
||||||
height: min(376px, 44.5svh);
|
height: min(352px, 42svh);
|
||||||
min-height: 250px;
|
min-height: 236px;
|
||||||
}
|
}
|
||||||
.hero .scenery {
|
.hero .scenery {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -529,7 +529,7 @@ input {
|
|||||||
}
|
}
|
||||||
.push {
|
.push {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-height: 0;
|
min-height: clamp(10px, 2svh, 16px);
|
||||||
}
|
}
|
||||||
h1 {
|
h1 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@@ -628,6 +628,39 @@ h1 {
|
|||||||
font: 700 17px var(--text-face);
|
font: 700 17px var(--text-face);
|
||||||
box-shadow: 0 14px 28px -14px rgba(17, 24, 39, 0.55);
|
box-shadow: 0 14px 28px -14px rgba(17, 24, 39, 0.55);
|
||||||
}
|
}
|
||||||
|
.discover {
|
||||||
|
position: relative;
|
||||||
|
padding-inline: 16px;
|
||||||
|
}
|
||||||
|
.trial-badge,
|
||||||
|
.trial-price {
|
||||||
|
border: 1px solid #bee3d7;
|
||||||
|
background: #e7f6ef;
|
||||||
|
color: #195247;
|
||||||
|
}
|
||||||
|
.trial-badge {
|
||||||
|
position: absolute;
|
||||||
|
inset-block-start: 0;
|
||||||
|
inset-inline: 0;
|
||||||
|
inline-size: max-content;
|
||||||
|
max-inline-size: calc(100% - 20px);
|
||||||
|
margin-inline: auto;
|
||||||
|
padding: 3px 8px;
|
||||||
|
border-radius: 999px;
|
||||||
|
box-shadow: 0 2px 6px #11182720;
|
||||||
|
font: 700 11px/1.4 var(--text-face);
|
||||||
|
transform: translateY(calc(-100% + 6px));
|
||||||
|
}
|
||||||
|
.trial-price {
|
||||||
|
margin: 8px 6px 0;
|
||||||
|
padding: 10px 6px;
|
||||||
|
border-radius: 12px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 700;
|
||||||
|
line-height: 1.4;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
}
|
||||||
.cta2 {
|
.cta2 {
|
||||||
min-height: 52px;
|
min-height: 52px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
@@ -715,33 +748,6 @@ h1 {
|
|||||||
color: var(--ink);
|
color: var(--ink);
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
|
||||||
}
|
}
|
||||||
.trip {
|
|
||||||
min-width: 0;
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
.trip h1 {
|
|
||||||
font-size: 28px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 10px;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
.trip p {
|
|
||||||
margin: 6px 0 0;
|
|
||||||
color: var(--text);
|
|
||||||
font-size: 14px;
|
|
||||||
line-height: 1.4;
|
|
||||||
}
|
|
||||||
.badge {
|
|
||||||
font-family: var(--text-face);
|
|
||||||
font-size: 11px;
|
|
||||||
font-weight: 700;
|
|
||||||
letter-spacing: 0.04em;
|
|
||||||
padding: 4px 10px;
|
|
||||||
border-radius: 999px;
|
|
||||||
background: var(--dark);
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
.pricebox {
|
.pricebox {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -823,64 +829,52 @@ h1 {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.specs {
|
.specs {
|
||||||
display: grid;
|
margin: 0;
|
||||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
padding: 0 12px;
|
||||||
gap: 8px;
|
list-style: none;
|
||||||
}
|
border-radius: 16px;
|
||||||
.spec {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 10px;
|
|
||||||
min-width: 0;
|
|
||||||
padding: 10px 12px;
|
|
||||||
border-radius: 14px;
|
|
||||||
background: #fff;
|
background: #fff;
|
||||||
box-shadow: 0 0 0 1px var(--line);
|
box-shadow: 0 0 0 1px var(--line);
|
||||||
}
|
}
|
||||||
|
.spec {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 28px minmax(0, 1.6fr) minmax(0, 1fr);
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
min-height: 44px;
|
||||||
|
padding-block: 8px;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
}
|
||||||
|
.spec + .spec {
|
||||||
|
border-block-start: 1px solid var(--line-soft);
|
||||||
|
}
|
||||||
.spec i {
|
.spec i {
|
||||||
width: 32px;
|
width: 28px;
|
||||||
height: 32px;
|
height: 28px;
|
||||||
flex: none;
|
border-radius: 8px;
|
||||||
border-radius: 10px;
|
|
||||||
display: grid;
|
display: grid;
|
||||||
place-items: center;
|
place-items: center;
|
||||||
background: var(--sand);
|
background: var(--sand);
|
||||||
color: var(--dark);
|
color: var(--dark);
|
||||||
}
|
}
|
||||||
.spec b {
|
.spec b {
|
||||||
display: block;
|
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 800;
|
font-weight: 700;
|
||||||
line-height: 1.2;
|
line-height: 1.35;
|
||||||
white-space: nowrap;
|
|
||||||
}
|
}
|
||||||
.spec small {
|
.spec bdi {
|
||||||
display: block;
|
justify-self: end;
|
||||||
font-size: 11.5px;
|
text-align: end;
|
||||||
color: var(--muted);
|
font-size: 13px;
|
||||||
font-weight: 600;
|
font-weight: 700;
|
||||||
line-height: 1.25;
|
line-height: 1.35;
|
||||||
white-space: nowrap;
|
}
|
||||||
|
.spec.off {
|
||||||
|
color: #626672;
|
||||||
}
|
}
|
||||||
.spec.off i {
|
.spec.off i {
|
||||||
color: var(--faint);
|
background: #f0f1f3;
|
||||||
}
|
color: inherit;
|
||||||
.spec.off b {
|
|
||||||
color: var(--muted);
|
|
||||||
}
|
|
||||||
.spec.wide {
|
|
||||||
grid-column: 1 / -1;
|
|
||||||
}
|
|
||||||
.spec.wide em {
|
|
||||||
margin-inline-start: auto;
|
|
||||||
font-style: normal;
|
|
||||||
font-size: 11.5px;
|
|
||||||
font-weight: 700;
|
|
||||||
color: var(--text);
|
|
||||||
background: var(--sand);
|
|
||||||
padding: 4px 9px;
|
|
||||||
border-radius: 999px;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
}
|
||||||
.legal {
|
.legal {
|
||||||
margin: 2px 0 0;
|
margin: 2px 0 0;
|
||||||
|
|||||||
@@ -521,7 +521,6 @@ export default function TripFormModal({
|
|||||||
{t('dashboard.tripTitle')} <span className="text-danger">*</span>
|
{t('dashboard.tripTitle')} <span className="text-danger">*</span>
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
data-initial-focus={(!embedded && canEditTrip) || undefined}
|
|
||||||
type="text"
|
type="text"
|
||||||
value={formData.title}
|
value={formData.title}
|
||||||
onChange={(e) => canEditTrip && update('title', e.target.value)}
|
onChange={(e) => canEditTrip && update('title', e.target.value)}
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
import { describe, expect, it } from 'vitest';
|
import { describe, expect, it } from 'vitest';
|
||||||
import { isNewCloudPlan, opensSoon, planForUnclaimedPurchase, refundedBeforeOpening } from './cloudOrders';
|
import {
|
||||||
|
isNewCloudPlan,
|
||||||
|
matchesPurchaseAgreement,
|
||||||
|
opensSoon,
|
||||||
|
planForUnclaimedPurchase,
|
||||||
|
refundedBeforeOpening,
|
||||||
|
} from './cloudOrders';
|
||||||
|
|
||||||
describe('opensSoon', () => {
|
describe('opensSoon', () => {
|
||||||
const base = { available: true, closed: true, sandbox: false, onPlay: false };
|
const base = { available: true, closed: true, sandbox: false, onPlay: false };
|
||||||
@@ -35,6 +41,15 @@ describe('refundedBeforeOpening', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('Cloud catalog and purchase recovery', () => {
|
describe('Cloud catalog and purchase recovery', () => {
|
||||||
|
it('only carries the accepted agreement into a new purchase if the current version and text still match', () => {
|
||||||
|
const accepted = { version: '2026-12-01', text: 'Agreed changes' };
|
||||||
|
expect(matchesPurchaseAgreement(accepted, { ...accepted })).toBe(true);
|
||||||
|
expect(matchesPurchaseAgreement(accepted, null)).toBe(false);
|
||||||
|
expect(matchesPurchaseAgreement(null, accepted)).toBe(false);
|
||||||
|
expect(matchesPurchaseAgreement(accepted, { ...accepted, version: '2026-12-02' })).toBe(false);
|
||||||
|
expect(matchesPurchaseAgreement(accepted, { ...accepted, text: 'Changed conditions' })).toBe(false);
|
||||||
|
});
|
||||||
|
|
||||||
it('only offers Start and Plus even when the server still lists retired plans', () => {
|
it('only offers Start and Plus even when the server still lists retired plans', () => {
|
||||||
expect(['start', 'basis', 'plus', 'pro'].filter(isNewCloudPlan)).toEqual(['start', 'plus']);
|
expect(['start', 'basis', 'plus', 'pro'].filter(isNewCloudPlan)).toEqual(['start', 'plus']);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -29,6 +29,21 @@ export function isNewCloudPlan(id: string): boolean {
|
|||||||
return id === 'start' || id === 'plus';
|
return id === 'start' || id === 'plus';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface CloudPurchaseAgreement {
|
||||||
|
version: string;
|
||||||
|
text: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Recheck the agreement before opening the store sheet. No agreement means no new purchase. */
|
||||||
|
export function matchesPurchaseAgreement(
|
||||||
|
accepted: CloudPurchaseAgreement | null,
|
||||||
|
current: CloudPurchaseAgreement | null
|
||||||
|
): boolean {
|
||||||
|
return (
|
||||||
|
accepted !== null && current !== null && accepted.version === current.version && accepted.text === current.text
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
const PLAN_NAMES: Record<string, string> = { start: 'Start', basis: 'Basis', plus: 'Plus', pro: 'Pro' };
|
const PLAN_NAMES: Record<string, string> = { start: 'Start', basis: 'Basis', plus: 'Plus', pro: 'Pro' };
|
||||||
|
|
||||||
/** A verified purchase can predate the current offer and still need its instance set up. */
|
/** A verified purchase can predate the current offer and still need its instance set up. */
|
||||||
|
|||||||
@@ -84,15 +84,22 @@ describe('native client', () => {
|
|||||||
expect(await fakeIapClient.isSandbox()).toBe(true);
|
expect(await fakeIapClient.isSandbox()).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('maps the store price strings by product', async () => {
|
it('maps the regular price and explicitly confirmed trial by product', async () => {
|
||||||
shell.storeProducts.mockResolvedValue({ products: [{ id: 'cloud.plus.monthly', displayPrice: '9,99 €' }] });
|
shell.storeProducts.mockResolvedValue({
|
||||||
const prices = await nativeIapClient.prices(['cloud.plus.monthly', 'cloud.pro.monthly']);
|
products: [
|
||||||
expect(shell.storeProducts).toHaveBeenCalledWith({ ids: ['cloud.plus.monthly', 'cloud.pro.monthly'] });
|
{ id: 'cloud.plus.monthly', displayPrice: '9,99 €', freeTrial: true },
|
||||||
expect(prices.get('cloud.plus.monthly')).toBe('9,99 €');
|
{ id: 'cloud.start.monthly', displayPrice: '4,99 €' },
|
||||||
expect(prices.has('cloud.pro.monthly')).toBe(false);
|
],
|
||||||
|
});
|
||||||
|
const ids = ['cloud.plus.monthly', 'cloud.start.monthly', 'cloud.plus.yearly'];
|
||||||
|
const products = await nativeIapClient.products(ids);
|
||||||
|
expect(shell.storeProducts).toHaveBeenCalledWith({ ids });
|
||||||
|
expect(products.get('cloud.plus.monthly')).toEqual({ displayPrice: '9,99 €', freeTrial: true });
|
||||||
|
expect(products.get('cloud.start.monthly')).toEqual({ displayPrice: '4,99 €', freeTrial: false });
|
||||||
|
expect(products.has('cloud.plus.yearly')).toBe(false);
|
||||||
|
|
||||||
shell.storeProducts.mockRejectedValue(new Error('down'));
|
shell.storeProducts.mockRejectedValue(new Error('down'));
|
||||||
expect((await nativeIapClient.prices(['cloud.plus.monthly'])).size).toBe(0);
|
expect((await nativeIapClient.products(['cloud.plus.monthly'])).size).toBe(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('turns a bought transaction into a receipt', async () => {
|
it('turns a bought transaction into a receipt', async () => {
|
||||||
@@ -124,6 +131,15 @@ describe('native client', () => {
|
|||||||
expect(await nativeIapClient.held()).toBe(false);
|
expect(await nativeIapClient.held()).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('asks the store to preserve an advertised trial and reports a changed offer without retrying as paid', async () => {
|
||||||
|
shell.storePurchase.mockResolvedValue({ kind: 'offer-changed' });
|
||||||
|
expect(await nativeIapClient.purchase('cloud.plus.monthly', '9,99 €')).toEqual({ kind: 'offer-changed' });
|
||||||
|
expect(shell.storePurchase).toHaveBeenCalledExactlyOnceWith({
|
||||||
|
productId: 'cloud.plus.monthly',
|
||||||
|
trialRenewalPrice: '9,99 €',
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
it('a build without storeHeld counts as holding nothing; the purchase still guards', async () => {
|
it('a build without storeHeld counts as holding nothing; the purchase still guards', async () => {
|
||||||
shell.storeHeld.mockRejectedValue(new Error('not implemented'));
|
shell.storeHeld.mockRejectedValue(new Error('not implemented'));
|
||||||
expect(await nativeIapClient.held()).toBe(false);
|
expect(await nativeIapClient.held()).toBe(false);
|
||||||
|
|||||||
+22
-11
@@ -38,17 +38,23 @@ type PurchaseOutcome =
|
|||||||
| { kind: 'cancelled' }
|
| { kind: 'cancelled' }
|
||||||
| { kind: 'pending' }
|
| { kind: 'pending' }
|
||||||
| { kind: 'failed' }
|
| { kind: 'failed' }
|
||||||
|
| { kind: 'offer-changed' }
|
||||||
| { kind: 'subscribed' };
|
| { kind: 'subscribed' };
|
||||||
|
|
||||||
|
export interface IapProduct {
|
||||||
|
displayPrice: string;
|
||||||
|
/** The store confirms an eligible first week at no charge. */
|
||||||
|
freeTrial: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
export interface IapClient {
|
export interface IapClient {
|
||||||
/** Whether this build can take a payment. */
|
/** Whether this build can take a payment. */
|
||||||
isAvailable(): Promise<boolean>;
|
isAvailable(): Promise<boolean>;
|
||||||
/**
|
/**
|
||||||
* The store's own price strings by product id, in the buyer's currency. A
|
* Store pricing and offer eligibility by product id. A missing product cannot
|
||||||
* product missing from the map cannot be bought here. Empty for the fake, whose
|
* be bought. Empty for the fake, whose prices come from the plan list.
|
||||||
* prices come from the plan list.
|
|
||||||
*/
|
*/
|
||||||
prices(productIds: string[]): Promise<Map<string, string>>;
|
products(productIds: string[]): Promise<Map<string, IapProduct>>;
|
||||||
/** A test build (TestFlight, App Review), whose purchases cost nothing and may go ahead before the opening. */
|
/** A test build (TestFlight, App Review), whose purchases cost nothing and may go ahead before the opening. */
|
||||||
isSandbox(): Promise<boolean>;
|
isSandbox(): Promise<boolean>;
|
||||||
/**
|
/**
|
||||||
@@ -58,7 +64,7 @@ export interface IapClient {
|
|||||||
*/
|
*/
|
||||||
held(): Promise<boolean>;
|
held(): Promise<boolean>;
|
||||||
/** Runs the platform's purchase sheet for a product and resolves with what became of it. */
|
/** Runs the platform's purchase sheet for a product and resolves with what became of it. */
|
||||||
purchase(productId: string): Promise<PurchaseOutcome>;
|
purchase(productId: string, trialRenewalPrice?: string): Promise<PurchaseOutcome>;
|
||||||
/** Tells the store a purchase was delivered, once its instance exists. */
|
/** Tells the store a purchase was delivered, once its instance exists. */
|
||||||
finish(purchase: Purchase): Promise<void>;
|
finish(purchase: Purchase): Promise<void>;
|
||||||
/** The subscription this store account already holds, for a reinstall or a new device. */
|
/** The subscription this store account already holds, for a reinstall or a new device. */
|
||||||
@@ -94,7 +100,7 @@ export const fakeIapClient: IapClient = {
|
|||||||
async isAvailable() {
|
async isAvailable() {
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
async prices() {
|
async products() {
|
||||||
return new Map();
|
return new Map();
|
||||||
},
|
},
|
||||||
async isSandbox() {
|
async isSandbox() {
|
||||||
@@ -151,10 +157,10 @@ export const nativeIapClient: IapClient = {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async prices(productIds) {
|
async products(productIds) {
|
||||||
try {
|
try {
|
||||||
const { products } = await TrekShell.storeProducts({ ids: productIds });
|
const { products } = await TrekShell.storeProducts({ ids: productIds });
|
||||||
return new Map(products.map((p) => [p.id, p.displayPrice]));
|
return new Map(products.map((p) => [p.id, { displayPrice: p.displayPrice, freeTrial: p.freeTrial === true }]));
|
||||||
} catch {
|
} catch {
|
||||||
return new Map();
|
return new Map();
|
||||||
}
|
}
|
||||||
@@ -166,9 +172,9 @@ export const nativeIapClient: IapClient = {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async purchase(productId) {
|
async purchase(productId, trialRenewalPrice) {
|
||||||
try {
|
try {
|
||||||
const result = await TrekShell.storePurchase({ productId });
|
const result = await TrekShell.storePurchase({ productId, ...(trialRenewalPrice ? { trialRenewalPrice } : {}) });
|
||||||
const receipt = result.jws ?? result.purchaseToken;
|
const receipt = result.jws ?? result.purchaseToken;
|
||||||
if (result.kind === 'bought' && receipt && result.transactionId) {
|
if (result.kind === 'bought' && receipt && result.transactionId) {
|
||||||
return {
|
return {
|
||||||
@@ -181,7 +187,12 @@ export const nativeIapClient: IapClient = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (result.kind === 'cancelled' || result.kind === 'pending' || result.kind === 'subscribed') {
|
if (
|
||||||
|
result.kind === 'cancelled' ||
|
||||||
|
result.kind === 'pending' ||
|
||||||
|
result.kind === 'subscribed' ||
|
||||||
|
result.kind === 'offer-changed'
|
||||||
|
) {
|
||||||
return { kind: result.kind };
|
return { kind: result.kind };
|
||||||
}
|
}
|
||||||
return { kind: 'failed' };
|
return { kind: 'failed' };
|
||||||
|
|||||||
@@ -128,14 +128,14 @@ export interface TrekShellPlugin {
|
|||||||
/** Feature storeKit (iOS) or playBilling (Android): the store's price strings for the products it knows. */
|
/** Feature storeKit (iOS) or playBilling (Android): the store's price strings for the products it knows. */
|
||||||
storeProducts(options: {
|
storeProducts(options: {
|
||||||
ids: string[];
|
ids: string[];
|
||||||
}): Promise<{ products: { id: string; displayPrice: string }[]; sandbox?: boolean }>;
|
}): Promise<{ products: { id: string; displayPrice: string; freeTrial?: boolean }[]; sandbox?: boolean }>;
|
||||||
/**
|
/**
|
||||||
* The purchase sheet. Set when bought: on iOS `jws`, the signed transaction; on
|
* The purchase sheet. Set when bought: on iOS `jws`, the signed transaction; on
|
||||||
* Android `purchaseToken`, which the control plane verifies with Google Play.
|
* Android `purchaseToken`, which the control plane verifies with Google Play.
|
||||||
*/
|
*/
|
||||||
storePurchase(options: { productId: string }): Promise<{
|
storePurchase(options: { productId: string; trialRenewalPrice?: string }): Promise<{
|
||||||
/** `subscribed`: this store account already holds a delivered subscription, so nothing was bought. */
|
/** `subscribed`: this store account already holds a delivered subscription, so nothing was bought. */
|
||||||
kind: 'bought' | 'cancelled' | 'pending' | 'failed' | 'subscribed';
|
kind: 'bought' | 'cancelled' | 'pending' | 'failed' | 'subscribed' | 'offer-changed';
|
||||||
jws?: string;
|
jws?: string;
|
||||||
purchaseToken?: string;
|
purchaseToken?: string;
|
||||||
productId?: string;
|
productId?: string;
|
||||||
|
|||||||
@@ -42,17 +42,8 @@ beforeEach(() => {
|
|||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
vi.useRealTimers();
|
vi.useRealTimers();
|
||||||
vi.unstubAllGlobals();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function mockFinePointer() {
|
|
||||||
const matchMedia = window.matchMedia.bind(window);
|
|
||||||
vi.stubGlobal('matchMedia', (query: string) => {
|
|
||||||
const result = matchMedia(query);
|
|
||||||
return query === '(pointer: fine)' ? { ...result, matches: true } : result;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
describe('DashboardPage', () => {
|
describe('DashboardPage', () => {
|
||||||
describe('FE-PAGE-DASH-001: Unauthenticated user is redirected', () => {
|
describe('FE-PAGE-DASH-001: Unauthenticated user is redirected', () => {
|
||||||
it('does not render dashboard content when not authenticated', () => {
|
it('does not render dashboard content when not authenticated', () => {
|
||||||
@@ -109,8 +100,7 @@ describe('DashboardPage', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('FE-PAGE-DASH-005: Create Trip button opens TripFormModal', () => {
|
describe('FE-PAGE-DASH-005: Create Trip button opens TripFormModal', () => {
|
||||||
it.each(['mouse', 'touch'])('PR-3305: opening the trip form sets the right focus for %s', async (pointer) => {
|
it('clicking New Trip button opens the trip form modal', async () => {
|
||||||
if (pointer === 'mouse') mockFinePointer();
|
|
||||||
const user = userEvent.setup();
|
const user = userEvent.setup();
|
||||||
render(<DashboardPage />);
|
render(<DashboardPage />);
|
||||||
|
|
||||||
@@ -120,9 +110,10 @@ describe('DashboardPage', () => {
|
|||||||
|
|
||||||
await user.click(screen.getAllByRole('button', { name: /new trip/i })[0]);
|
await user.click(screen.getAllByRole('button', { name: /new trip/i })[0]);
|
||||||
|
|
||||||
const dialog = await screen.findByRole('dialog', { name: 'Create New Trip' });
|
// TripFormModal opens — "Create New Trip" appears in heading and submit button
|
||||||
const target = pointer === 'mouse' ? within(dialog).getByPlaceholderText(/summer in japan/i) : dialog;
|
await waitFor(() => {
|
||||||
expect(target).toHaveFocus();
|
expect(screen.getAllByText(/create new trip/i).length).toBeGreaterThan(0);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -262,8 +253,7 @@ describe('DashboardPage', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('FE-PAGE-DASH-012: Edit trip opens form with pre-filled data', () => {
|
describe('FE-PAGE-DASH-012: Edit trip opens form with pre-filled data', () => {
|
||||||
it('PR-3305: focuses the prefilled title when editing a trip', async () => {
|
it('clicking edit on a trip card opens TripFormModal with trip title pre-filled', async () => {
|
||||||
mockFinePointer();
|
|
||||||
const user = userEvent.setup();
|
const user = userEvent.setup();
|
||||||
render(<DashboardPage />);
|
render(<DashboardPage />);
|
||||||
|
|
||||||
@@ -276,7 +266,7 @@ describe('DashboardPage', () => {
|
|||||||
|
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
const titleInput = screen.getByDisplayValue('Paris Adventure');
|
const titleInput = screen.getByDisplayValue('Paris Adventure');
|
||||||
expect(titleInput).toHaveFocus();
|
expect(titleInput).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -9,9 +9,14 @@ import ForgotPasswordPage from './ForgotPasswordPage'
|
|||||||
// forgotPassword/useForgotPassword.test.ts). The hook is mocked so the form,
|
// forgotPassword/useForgotPassword.test.ts). The hook is mocked so the form,
|
||||||
// the sent screen and the SMTP hint can each be rendered on demand.
|
// the sent screen and the SMTP hint can each be rendered on demand.
|
||||||
|
|
||||||
const mocks = vi.hoisted(() => ({ forgot: {} as Record<string, unknown> }))
|
const mocks = vi.hoisted(() => ({ forgot: {} as Record<string, unknown>, native: false }))
|
||||||
|
|
||||||
vi.mock('./forgotPassword/useForgotPassword', () => ({ useForgotPassword: () => mocks.forgot }))
|
vi.mock('./forgotPassword/useForgotPassword', () => ({ useForgotPassword: () => mocks.forgot }))
|
||||||
|
vi.mock('../native/platform', async (importOriginal) => ({
|
||||||
|
...(await importOriginal<typeof import('../native/platform')>()),
|
||||||
|
isNativeApp: () => mocks.native,
|
||||||
|
}))
|
||||||
|
vi.mock('../../native-shell/scenery', () => ({ startScenery: vi.fn(), cameraForPlan: () => [0, 0] }))
|
||||||
|
|
||||||
const navigate = vi.fn((_to: string) => {})
|
const navigate = vi.fn((_to: string) => {})
|
||||||
const setEmail = vi.fn((_v: string) => {})
|
const setEmail = vi.fn((_v: string) => {})
|
||||||
@@ -32,6 +37,7 @@ function setForgot(over: Record<string, unknown> = {}) {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
vi.clearAllMocks()
|
vi.clearAllMocks()
|
||||||
|
mocks.native = false
|
||||||
setForgot()
|
setForgot()
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -124,4 +130,28 @@ describe('ForgotPasswordPage', () => {
|
|||||||
expect(screen.getByRole('heading', { name: 'Check your email' })).toBeInTheDocument()
|
expect(screen.getByRole('heading', { name: 'Check your email' })).toBeInTheDocument()
|
||||||
expect(screen.getByText(/console/i)).toBeInTheDocument()
|
expect(screen.getByText(/console/i)).toBeInTheDocument()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('keeps the SMTP warning visible throughout native password recovery', () => {
|
||||||
|
mocks.native = true
|
||||||
|
setForgot({ smtpConfigured: false })
|
||||||
|
const { rerender } = render(<ForgotPasswordPage />)
|
||||||
|
|
||||||
|
expect(screen.getByRole('main')).toHaveClass('al-body')
|
||||||
|
expect(screen.getByRole('textbox', { name: 'Email' })).toHaveAttribute('autocomplete', 'email')
|
||||||
|
expect(screen.getByText(/hasn't configured SMTP/i)).toBeVisible()
|
||||||
|
|
||||||
|
setForgot({ smtpConfigured: false, submitted: true })
|
||||||
|
rerender(<ForgotPasswordPage />)
|
||||||
|
expect(screen.getByText(/hasn't configured SMTP/i)).toBeVisible()
|
||||||
|
expect(screen.queryByRole('heading', { name: 'Check your email' })).not.toBeInTheDocument()
|
||||||
|
})
|
||||||
|
|
||||||
|
it('lets a native user try again after a requester-wide rate limit', () => {
|
||||||
|
mocks.native = true
|
||||||
|
setForgot({ submitted: true, deliveryIssue: 'rateLimit' })
|
||||||
|
render(<ForgotPasswordPage />)
|
||||||
|
|
||||||
|
expect(screen.getByRole('alert')).toHaveTextContent('Too many attempts')
|
||||||
|
expect(screen.getByRole('button', { name: 'Send reset link' })).toBeEnabled()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import React, { ChangeEvent } from 'react'
|
import React, { ChangeEvent } from 'react'
|
||||||
import { Mail, ArrowLeft, CheckCircle2, Terminal } from 'lucide-react'
|
import { Mail, ArrowLeft, CheckCircle2, Terminal } from 'lucide-react'
|
||||||
import { useTranslation } from '../i18n'
|
import { useTranslation } from '../i18n'
|
||||||
|
import { isNativeApp } from '../native/platform'
|
||||||
|
import AppForgotPassword from './forgotPassword/AppForgotPassword'
|
||||||
import { useForgotPassword } from './forgotPassword/useForgotPassword'
|
import { useForgotPassword } from './forgotPassword/useForgotPassword'
|
||||||
|
|
||||||
const inputBase: React.CSSProperties = {
|
const inputBase: React.CSSProperties = {
|
||||||
@@ -13,7 +15,9 @@ const inputBase: React.CSSProperties = {
|
|||||||
function ForgotPasswordPage() {
|
function ForgotPasswordPage() {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
// Page = wiring container: form state, the SMTP probe and submit live in the hook.
|
// Page = wiring container: form state, the SMTP probe and submit live in the hook.
|
||||||
const { navigate, email, setEmail, submitted, isLoading, smtpConfigured, handleSubmit } = useForgotPassword()
|
const forgot = useForgotPassword()
|
||||||
|
const { navigate, email, setEmail, submitted, isLoading, smtpConfigured, handleSubmit } = forgot
|
||||||
|
if (isNativeApp()) return <AppForgotPassword forgot={forgot} />
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{
|
<div style={{
|
||||||
|
|||||||
@@ -9,9 +9,14 @@ import ResetPasswordPage from './ResetPasswordPage'
|
|||||||
// resetPassword/useResetPassword.test.ts). The hook is mocked so the success,
|
// resetPassword/useResetPassword.test.ts). The hook is mocked so the success,
|
||||||
// broken-link, password and MFA screens can each be rendered directly.
|
// broken-link, password and MFA screens can each be rendered directly.
|
||||||
|
|
||||||
const mocks = vi.hoisted(() => ({ reset: {} as Record<string, unknown> }))
|
const mocks = vi.hoisted(() => ({ reset: {} as Record<string, unknown>, native: false }))
|
||||||
|
|
||||||
vi.mock('./resetPassword/useResetPassword', () => ({ useResetPassword: () => mocks.reset }))
|
vi.mock('./resetPassword/useResetPassword', () => ({ useResetPassword: () => mocks.reset }))
|
||||||
|
vi.mock('../native/platform', async (importOriginal) => ({
|
||||||
|
...(await importOriginal<typeof import('../native/platform')>()),
|
||||||
|
isNativeApp: () => mocks.native,
|
||||||
|
}))
|
||||||
|
vi.mock('../../native-shell/scenery', () => ({ startScenery: vi.fn(), cameraForPlan: () => [0, 0] }))
|
||||||
|
|
||||||
const navigate = vi.fn((_to: string) => {})
|
const navigate = vi.fn((_to: string) => {})
|
||||||
const setPw = vi.fn((_v: string) => {})
|
const setPw = vi.fn((_v: string) => {})
|
||||||
@@ -43,10 +48,35 @@ function setReset(over: Record<string, unknown> = {}) {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
vi.clearAllMocks()
|
vi.clearAllMocks()
|
||||||
|
mocks.native = false
|
||||||
setReset()
|
setReset()
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('ResetPasswordPage', () => {
|
describe('ResetPasswordPage', () => {
|
||||||
|
it('announces reset errors and supports backup codes on the native screen', () => {
|
||||||
|
mocks.native = true
|
||||||
|
setReset({ mfaRequired: true, error: 'The security code was rejected' })
|
||||||
|
render(<ResetPasswordPage />)
|
||||||
|
|
||||||
|
expect(screen.getByRole('main')).toHaveClass('al-body')
|
||||||
|
expect(screen.getByRole('alert')).toHaveTextContent('The security code was rejected')
|
||||||
|
const code = screen.getByRole('textbox', { name: '2FA code' })
|
||||||
|
expect(code).toHaveAttribute('autocomplete', 'one-time-code')
|
||||||
|
fireEvent.change(code, { target: { value: 'ABCD-EFGH' } })
|
||||||
|
expect(setMfaCode).toHaveBeenCalledWith('ABCD-EFGH')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('lets the native user request another link when the server rejects the current one', () => {
|
||||||
|
mocks.native = true
|
||||||
|
setReset({ linkInvalid: true })
|
||||||
|
render(<ResetPasswordPage />)
|
||||||
|
|
||||||
|
expect(screen.getByRole('heading', { name: 'Invalid reset link' })).toBeVisible()
|
||||||
|
expect(screen.queryByLabelText('New password')).not.toBeInTheDocument()
|
||||||
|
fireEvent.click(screen.getByRole('button', { name: 'Send reset link' }))
|
||||||
|
expect(navigate).toHaveBeenCalledWith('/forgot-password')
|
||||||
|
})
|
||||||
|
|
||||||
it('FE-PAGE-RESETUI-001: renders the password form for a valid token', () => {
|
it('FE-PAGE-RESETUI-001: renders the password form for a valid token', () => {
|
||||||
setReset()
|
setReset()
|
||||||
render(<ResetPasswordPage />)
|
render(<ResetPasswordPage />)
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import React, { ChangeEvent } from 'react'
|
import React, { ChangeEvent } from 'react'
|
||||||
import { Lock, KeyRound, CheckCircle2, AlertTriangle, Eye, EyeOff } from 'lucide-react'
|
import { Lock, KeyRound, CheckCircle2, AlertTriangle, Eye, EyeOff } from 'lucide-react'
|
||||||
import { useTranslation } from '../i18n'
|
import { useTranslation } from '../i18n'
|
||||||
|
import { isNativeApp } from '../native/platform'
|
||||||
|
import AppResetPassword from './resetPassword/AppResetPassword'
|
||||||
import { useResetPassword } from './resetPassword/useResetPassword'
|
import { useResetPassword } from './resetPassword/useResetPassword'
|
||||||
import PasswordChecklist from '../components/shared/PasswordChecklist'
|
import PasswordChecklist from '../components/shared/PasswordChecklist'
|
||||||
|
|
||||||
@@ -14,12 +16,14 @@ const inputBase: React.CSSProperties = {
|
|||||||
function ResetPasswordPage() {
|
function ResetPasswordPage() {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
// Page = wiring container: token, form state, validation + submit live in the hook.
|
// Page = wiring container: token, form state, validation + submit live in the hook.
|
||||||
|
const reset = useResetPassword()
|
||||||
const {
|
const {
|
||||||
navigate, token,
|
navigate, token, linkInvalid,
|
||||||
pw, setPw, pw2, setPw2, showPw, setShowPw,
|
pw, setPw, pw2, setPw2, showPw, setShowPw,
|
||||||
mfaCode, setMfaCode, mfaRequired, error, success, isLoading,
|
mfaCode, setMfaCode, mfaRequired, error, success, isLoading,
|
||||||
handleSubmit,
|
handleSubmit,
|
||||||
} = useResetPassword()
|
} = reset
|
||||||
|
if (isNativeApp()) return <AppResetPassword reset={reset} />
|
||||||
|
|
||||||
const shell = (inner: React.ReactNode) => (
|
const shell = (inner: React.ReactNode) => (
|
||||||
<div style={{
|
<div style={{
|
||||||
@@ -57,7 +61,7 @@ function ResetPasswordPage() {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!token) {
|
if (!token || linkInvalid) {
|
||||||
return shell(
|
return shell(
|
||||||
<div style={{ textAlign: 'center', padding: '12px 0' }}>
|
<div style={{ textAlign: 'center', padding: '12px 0' }}>
|
||||||
<div style={{
|
<div style={{
|
||||||
|
|||||||
@@ -0,0 +1,61 @@
|
|||||||
|
import { CheckCircle2 } from 'lucide-react';
|
||||||
|
import { useTranslation } from '../../i18n';
|
||||||
|
import { AppAuthScreen, Field, Notice } from '../login/AppAuthScreen';
|
||||||
|
import type { useForgotPassword } from './useForgotPassword';
|
||||||
|
|
||||||
|
export default function AppForgotPassword({ forgot }: { forgot: ReturnType<typeof useForgotPassword> }) {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
const back = () => void forgot.navigate('/login');
|
||||||
|
const smtpOff = forgot.smtpConfigured === false;
|
||||||
|
const smtpNotice = smtpOff && <Notice tone="warn">{t('login.forgotPasswordSmtpHintOff')}</Notice>;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<AppAuthScreen>
|
||||||
|
{forgot.submitted && !forgot.deliveryIssue ? (
|
||||||
|
<div className="al-form">
|
||||||
|
<div className="al-recovery-feedback" role="status">
|
||||||
|
{!smtpOff && <CheckCircle2 className="al-recovery-icon" size={28} aria-hidden="true" />}
|
||||||
|
<h1 className="al-title">{t(smtpOff ? 'login.forgotPasswordTitle' : 'login.forgotPasswordSentTitle')}</h1>
|
||||||
|
{!smtpOff && <p className="al-sub">{t('login.forgotPasswordSentBody')}</p>}
|
||||||
|
</div>
|
||||||
|
{smtpNotice}
|
||||||
|
<button type="button" className="al-cta" onClick={back}>
|
||||||
|
{t('login.backToLogin')}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
<form className="al-form" onSubmit={(event) => void forgot.handleSubmit(event)}>
|
||||||
|
<h1 className="al-title">{t('login.forgotPasswordTitle')}</h1>
|
||||||
|
<p className="al-sub">{t('login.forgotPasswordBody')}</p>
|
||||||
|
{smtpNotice}
|
||||||
|
{forgot.deliveryIssue && (
|
||||||
|
<Notice>
|
||||||
|
{t(forgot.deliveryIssue === 'rateLimit' ? 'common.tooManyAttempts' : 'native.connect.errorUnreachable')}
|
||||||
|
</Notice>
|
||||||
|
)}
|
||||||
|
<Field
|
||||||
|
label={t('common.email')}
|
||||||
|
name="email"
|
||||||
|
type="email"
|
||||||
|
autoComplete="email"
|
||||||
|
autoCapitalize="none"
|
||||||
|
enterKeyHint="send"
|
||||||
|
value={forgot.email}
|
||||||
|
onChange={(event) => forgot.setEmail(event.target.value)}
|
||||||
|
placeholder={t('login.emailPlaceholder')}
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
<button type="submit" className="al-cta" disabled={forgot.isLoading}>
|
||||||
|
{forgot.isLoading && <span className="al-spin" aria-hidden="true" />}
|
||||||
|
{forgot.isLoading ? t('common.loading') : t('login.forgotPasswordSubmit')}
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
<button type="button" className="al-forgot" onClick={back}>
|
||||||
|
{t('login.backToLogin')}
|
||||||
|
</button>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</AppAuthScreen>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
// FE-PAGE-FORGOT-001 to FE-PAGE-FORGOT-008
|
// FE-PAGE-FORGOT-001 to FE-PAGE-FORGOT-008
|
||||||
import { act, renderHook, waitFor } from '@testing-library/react';
|
import { act, renderHook, waitFor } from '@testing-library/react';
|
||||||
|
import { AxiosError } from 'axios';
|
||||||
import type { FormEvent } from 'react';
|
import type { FormEvent } from 'react';
|
||||||
import { authApi } from '../../api/client';
|
import { authApi } from '../../api/client';
|
||||||
import { useForgotPassword } from './useForgotPassword';
|
import { useForgotPassword } from './useForgotPassword';
|
||||||
@@ -72,6 +73,18 @@ describe('useForgotPassword', () => {
|
|||||||
await act(() => result.current.handleSubmit(submitEvent()));
|
await act(() => result.current.handleSubmit(submitEvent()));
|
||||||
|
|
||||||
expect(result.current.submitted).toBe(true);
|
expect(result.current.submitted).toBe(true);
|
||||||
|
expect(result.current.deliveryIssue).toBeNull();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('distinguishes a lost connection without revealing information about the address', async () => {
|
||||||
|
vi.mocked(authApi.forgotPassword).mockRejectedValueOnce(new AxiosError('Lost connection', 'ERR_NETWORK'));
|
||||||
|
const { result } = renderHook(() => useForgotPassword());
|
||||||
|
|
||||||
|
await act(() => result.current.handleSubmit(submitEvent()));
|
||||||
|
expect(result.current.deliveryIssue).toBe('connection');
|
||||||
|
|
||||||
|
await act(() => result.current.handleSubmit(submitEvent()));
|
||||||
|
expect(result.current.deliveryIssue).toBeNull();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('FE-PAGE-FORGOT-007: ignores a second submit while the first is in flight', async () => {
|
it('FE-PAGE-FORGOT-007: ignores a second submit while the first is in flight', async () => {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { useState, useEffect, type FormEvent } from 'react'
|
import { useState, useEffect, type FormEvent } from 'react'
|
||||||
import { useNavigate } from 'react-router'
|
import { useNavigate } from 'react-router'
|
||||||
|
import { isAxiosError } from 'axios'
|
||||||
import { authApi } from '../../api/client'
|
import { authApi } from '../../api/client'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -14,6 +15,7 @@ export function useForgotPassword() {
|
|||||||
const [submitted, setSubmitted] = useState(false)
|
const [submitted, setSubmitted] = useState(false)
|
||||||
const [isLoading, setIsLoading] = useState(false)
|
const [isLoading, setIsLoading] = useState(false)
|
||||||
const [smtpConfigured, setSmtpConfigured] = useState<boolean | null>(null)
|
const [smtpConfigured, setSmtpConfigured] = useState<boolean | null>(null)
|
||||||
|
const [deliveryIssue, setDeliveryIssue] = useState<'connection' | 'rateLimit' | null>(null)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// Probe whether SMTP is configured so we can warn the user up-front that the
|
// Probe whether SMTP is configured so we can warn the user up-front that the
|
||||||
@@ -29,15 +31,21 @@ export function useForgotPassword() {
|
|||||||
const handleSubmit = async (e: FormEvent) => {
|
const handleSubmit = async (e: FormEvent) => {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
if (isLoading) return
|
if (isLoading) return
|
||||||
|
setDeliveryIssue(null)
|
||||||
setIsLoading(true)
|
setIsLoading(true)
|
||||||
try {
|
try {
|
||||||
await authApi.forgotPassword({ email: email.trim() })
|
await authApi.forgotPassword({ email: email.trim() })
|
||||||
} catch {
|
} catch (error) {
|
||||||
// Enumeration-safe: success UX regardless of server outcome.
|
// These errors apply to the connection or requester, not to the mailbox.
|
||||||
|
// Keep every other outcome indistinguishable from an accepted request.
|
||||||
|
if (isAxiosError(error)) {
|
||||||
|
if (error.response?.status === 429) setDeliveryIssue('rateLimit')
|
||||||
|
else if (!error.response) setDeliveryIssue('connection')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
setSubmitted(true)
|
setSubmitted(true)
|
||||||
setIsLoading(false)
|
setIsLoading(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
return { navigate, email, setEmail, submitted, isLoading, smtpConfigured, handleSubmit }
|
return { navigate, email, setEmail, submitted, isLoading, smtpConfigured, deliveryIssue, handleSubmit }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,87 @@
|
|||||||
|
import { AlertCircle, Globe, Lock } from 'lucide-react';
|
||||||
|
import { useEffect, useRef, type InputHTMLAttributes, type ReactNode } from 'react';
|
||||||
|
import { useNativeServer } from '../../components/Settings/useNativeServer';
|
||||||
|
import { useTranslation } from '../../i18n';
|
||||||
|
import { lightStatusBarIcons } from '../../native/appBoot';
|
||||||
|
import { reportNativeFailure } from '../../native/reportFailure';
|
||||||
|
import './appLogin.css';
|
||||||
|
|
||||||
|
export function AppAuthScreen({ children, leaving }: { children: ReactNode; leaving?: boolean }) {
|
||||||
|
useEffect(() => lightStatusBarIcons(), []);
|
||||||
|
return (
|
||||||
|
<div className={leaving ? 'app-login al-leaving' : 'app-login'}>
|
||||||
|
<AppAuthHero />
|
||||||
|
<main className="al-body">{children}</main>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function AppAuthHero() {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
const { host, changeServer } = useNativeServer();
|
||||||
|
const hero = useRef<HTMLDivElement>(null);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const box = hero.current;
|
||||||
|
if (!box) return;
|
||||||
|
let cancelled = false;
|
||||||
|
// Keep the landscape in the position where the address screen leaves it.
|
||||||
|
void import('../../../native-shell/scenery')
|
||||||
|
.then(({ startScenery, cameraForPlan }) => {
|
||||||
|
if (!cancelled) startScenery(box, { frame: 320, camera: cameraForPlan(1), haze: false });
|
||||||
|
})
|
||||||
|
.catch(reportNativeFailure);
|
||||||
|
return () => {
|
||||||
|
cancelled = true;
|
||||||
|
box.querySelector('canvas.scenery')?.remove();
|
||||||
|
};
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="al-hero" ref={hero}>
|
||||||
|
<img className="al-logo" src="/logo-light.svg" alt="TREK" />
|
||||||
|
{host && (
|
||||||
|
<div className="al-card">
|
||||||
|
<div className="al-card-text">
|
||||||
|
<small>
|
||||||
|
<Lock size={12} strokeWidth={2.6} aria-hidden="true" />
|
||||||
|
{t('native.connect.yourTrek')}
|
||||||
|
</small>
|
||||||
|
<div className="al-host" dir="ltr">
|
||||||
|
<Globe size={17} aria-hidden="true" />
|
||||||
|
<span>{host}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button type="button" className="al-change" onClick={changeServer} aria-label={t('native.changeServer')}>
|
||||||
|
{t('common.change')}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function Notice({ tone, children }: { tone?: 'warn'; children: ReactNode }) {
|
||||||
|
return (
|
||||||
|
<div className={tone ? `al-notice ${tone}` : 'al-notice'} role={tone ? 'status' : 'alert'}>
|
||||||
|
<AlertCircle size={18} aria-hidden="true" />
|
||||||
|
<div>{children}</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function Field({
|
||||||
|
label,
|
||||||
|
after,
|
||||||
|
...input
|
||||||
|
}: { label: string; after?: ReactNode } & InputHTMLAttributes<HTMLInputElement>) {
|
||||||
|
return (
|
||||||
|
<div className={after ? 'al-fld-wrap with-after' : 'al-fld-wrap'}>
|
||||||
|
<label className="al-fld">
|
||||||
|
<span className="al-lab">{label}</span>
|
||||||
|
<input {...input} />
|
||||||
|
</label>
|
||||||
|
{after && <span className="al-after">{after}</span>}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,12 +1,8 @@
|
|||||||
import { AlertCircle, Eye, EyeOff, Fingerprint, Globe, Lock, Shield } from 'lucide-react';
|
import { Eye, EyeOff, Fingerprint, Shield } from 'lucide-react';
|
||||||
import React, { useEffect, useRef } from 'react';
|
|
||||||
import ToggleSwitch from '../../components/Settings/ToggleSwitch';
|
import ToggleSwitch from '../../components/Settings/ToggleSwitch';
|
||||||
import { useNativeServer } from '../../components/Settings/useNativeServer';
|
|
||||||
import PasswordChecklist from '../../components/shared/PasswordChecklist';
|
import PasswordChecklist from '../../components/shared/PasswordChecklist';
|
||||||
import { useTranslation } from '../../i18n';
|
import { useTranslation } from '../../i18n';
|
||||||
import { lightStatusBarIcons } from '../../native/appBoot';
|
import { AppAuthScreen, Field, Notice } from './AppAuthScreen';
|
||||||
import { reportNativeFailure } from '../../native/reportFailure';
|
|
||||||
import './appLogin.css';
|
|
||||||
import { heading as headingOf, oidcLoginHref, oidcOnlyHref, submitLabel, type LoginStep } from './loginModel';
|
import { heading as headingOf, oidcLoginHref, oidcOnlyHref, submitLabel, type LoginStep } from './loginModel';
|
||||||
import { mfaCodeInputProps } from './mfaCodeInput';
|
import { mfaCodeInputProps } from './mfaCodeInput';
|
||||||
import { IDP_LOGIN_URL, type useLogin } from './useLogin';
|
import { IDP_LOGIN_URL, type useLogin } from './useLogin';
|
||||||
@@ -22,14 +18,10 @@ type Login = ReturnType<typeof useLogin>;
|
|||||||
* (the device decides, see useLogin) differ.
|
* (the device decides, see useLogin) differ.
|
||||||
*/
|
*/
|
||||||
export default function AppLogin({ login }: { login: Login }) {
|
export default function AppLogin({ login }: { login: Login }) {
|
||||||
useEffect(() => lightStatusBarIcons(), []);
|
|
||||||
return (
|
return (
|
||||||
<div className={login.showTakeoff ? 'app-login al-leaving' : 'app-login'}>
|
<AppAuthScreen leaving={login.showTakeoff}>
|
||||||
<AppLoginHero />
|
<AppLoginContent login={login} />
|
||||||
<main className="al-body">
|
</AppAuthScreen>
|
||||||
<AppLoginContent login={login} />
|
|
||||||
</main>
|
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,85 +51,6 @@ function AppLoginContent({ login }: { login: Login }) {
|
|||||||
return <Credentials login={login} />;
|
return <Credentials login={login} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** The landscape of the address screen, with the server this screen signs in to. */
|
|
||||||
function AppLoginHero() {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
const { host, changeServer } = useNativeServer();
|
|
||||||
const hero = useRef<HTMLDivElement>(null);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
const box = hero.current;
|
|
||||||
if (!box) return;
|
|
||||||
let cancelled = false;
|
|
||||||
// The same camera the address screen ends on, so the picture holds still
|
|
||||||
// across the change of screens. The scene stops drawing once its canvas
|
|
||||||
// has left the page.
|
|
||||||
void import('../../../native-shell/scenery')
|
|
||||||
.then(({ startScenery, cameraForPlan }) => {
|
|
||||||
if (!cancelled) startScenery(box, { frame: 320, camera: cameraForPlan(1), haze: false });
|
|
||||||
})
|
|
||||||
// Without the landscape the box keeps its plain sea colour.
|
|
||||||
.catch(reportNativeFailure);
|
|
||||||
return () => {
|
|
||||||
cancelled = true;
|
|
||||||
box.querySelector('canvas.scenery')?.remove();
|
|
||||||
};
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="al-hero" ref={hero}>
|
|
||||||
<img className="al-logo" src="/logo-light.svg" alt="TREK" />
|
|
||||||
{host && (
|
|
||||||
<div className="al-card">
|
|
||||||
<div className="al-card-text">
|
|
||||||
<small>
|
|
||||||
<Lock size={12} strokeWidth={2.6} aria-hidden="true" />
|
|
||||||
{t('native.connect.yourTrek')}
|
|
||||||
</small>
|
|
||||||
<div className="al-host" dir="ltr">
|
|
||||||
<Globe size={17} aria-hidden="true" />
|
|
||||||
<span>{host}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<button type="button" className="al-change" onClick={changeServer} aria-label={t('native.changeServer')}>
|
|
||||||
{t('common.change')}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function Notice({ tone, children }: { tone?: 'warn'; children: React.ReactNode }) {
|
|
||||||
return (
|
|
||||||
<div className={tone ? `al-notice ${tone}` : 'al-notice'} role={tone ? undefined : 'alert'}>
|
|
||||||
<AlertCircle size={18} aria-hidden="true" />
|
|
||||||
<div>{children}</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A field on a white card, the label above the input, as on the address screen.
|
|
||||||
* A control beside the input (the password's eye) sits outside the label, so
|
|
||||||
* the label names the input alone.
|
|
||||||
*/
|
|
||||||
function Field({
|
|
||||||
label,
|
|
||||||
after,
|
|
||||||
...input
|
|
||||||
}: { label: string; after?: React.ReactNode } & React.InputHTMLAttributes<HTMLInputElement>) {
|
|
||||||
return (
|
|
||||||
<div className={after ? 'al-fld-wrap with-after' : 'al-fld-wrap'}>
|
|
||||||
<label className="al-fld">
|
|
||||||
<span className="al-lab">{label}</span>
|
|
||||||
<input {...input} />
|
|
||||||
</label>
|
|
||||||
{after && <span className="al-after">{after}</span>}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function OidcOnly({ login }: { login: Login }) {
|
function OidcOnly({ login }: { login: Login }) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* The sign-in screen inside the iOS and Android app (AppLogin.tsx). It is the
|
* The sign-in and password recovery screens inside the iOS and Android app. The sign-in is the
|
||||||
* next screen after the app's own address screen (native-shell/), so it wears
|
* next screen after the app's own address screen (native-shell/), so it wears
|
||||||
* that screen's look: the same landscape on top, the same glass card with the
|
* that screen's look: the same landscape on top, the same glass card with the
|
||||||
* server on it, the same type, fields and buttons on the same warm page. The
|
* server on it, the same type, fields and buttons on the same warm page. The
|
||||||
@@ -295,6 +295,14 @@
|
|||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
color: var(--al-text);
|
color: var(--al-text);
|
||||||
}
|
}
|
||||||
|
.al-recovery-feedback {
|
||||||
|
display: grid;
|
||||||
|
gap: 8px;
|
||||||
|
justify-items: start;
|
||||||
|
}
|
||||||
|
.al-recovery-icon {
|
||||||
|
color: var(--al-good);
|
||||||
|
}
|
||||||
|
|
||||||
/* A field on a white card: the label above, the input below it. */
|
/* A field on a white card: the label above, the input below it. */
|
||||||
.al-fld {
|
.al-fld {
|
||||||
|
|||||||
@@ -0,0 +1,95 @@
|
|||||||
|
import { CheckCircle2, Eye, EyeOff } from 'lucide-react';
|
||||||
|
import PasswordChecklist from '../../components/shared/PasswordChecklist';
|
||||||
|
import { useTranslation } from '../../i18n';
|
||||||
|
import { AppAuthScreen, Field, Notice } from '../login/AppAuthScreen';
|
||||||
|
import { mfaCodeInputProps } from '../login/mfaCodeInput';
|
||||||
|
import type { useResetPassword } from './useResetPassword';
|
||||||
|
|
||||||
|
type Reset = ReturnType<typeof useResetPassword>;
|
||||||
|
|
||||||
|
export default function AppResetPassword({ reset }: { reset: Reset }) {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
return (
|
||||||
|
<AppAuthScreen>
|
||||||
|
{reset.success ? (
|
||||||
|
<div className="al-form">
|
||||||
|
<div className="al-recovery-feedback" role="status">
|
||||||
|
<CheckCircle2 className="al-recovery-icon" size={28} aria-hidden="true" />
|
||||||
|
<h1 className="al-title">{t('login.resetPasswordSuccessTitle')}</h1>
|
||||||
|
<p className="al-sub">{t('login.resetPasswordSuccessBody')}</p>
|
||||||
|
</div>
|
||||||
|
<button type="button" className="al-cta" onClick={() => void reset.navigate('/login')}>
|
||||||
|
{t('login.signIn')}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
) : !reset.token || reset.linkInvalid ? (
|
||||||
|
<div className="al-form">
|
||||||
|
<h1 className="al-title">{t('login.resetPasswordInvalidLink')}</h1>
|
||||||
|
<Notice>{t('login.resetPasswordInvalidLinkBody')}</Notice>
|
||||||
|
<button type="button" className="al-cta" onClick={() => void reset.navigate('/forgot-password')}>
|
||||||
|
{t('login.forgotPasswordSubmit')}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<ResetForm reset={reset} />
|
||||||
|
)}
|
||||||
|
</AppAuthScreen>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function ResetForm({ reset }: { reset: Reset }) {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
const inputType = reset.showPw ? 'text' : 'password';
|
||||||
|
const title = reset.mfaRequired ? t('login.mfaTitle') : t('login.resetPasswordTitle');
|
||||||
|
const action = reset.mfaRequired ? t('login.resetPasswordVerify') : t('login.resetPasswordSubmit');
|
||||||
|
return (
|
||||||
|
<form className="al-form" onSubmit={(event) => void reset.handleSubmit(event)}>
|
||||||
|
<h1 className="al-title">{title}</h1>
|
||||||
|
<p className="al-sub">{t(reset.mfaRequired ? 'login.resetPasswordMfaBody' : 'login.resetPasswordBody')}</p>
|
||||||
|
{reset.error && <Notice>{reset.error}</Notice>}
|
||||||
|
{reset.mfaRequired ? (
|
||||||
|
<Field
|
||||||
|
label={t('login.mfaCode')}
|
||||||
|
{...mfaCodeInputProps(reset.mfaCode, reset.setMfaCode, t('login.mfaPlaceholder'))}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
<Field
|
||||||
|
label={t('login.newPassword')}
|
||||||
|
type={inputType}
|
||||||
|
name="new-password"
|
||||||
|
autoComplete="new-password"
|
||||||
|
value={reset.pw}
|
||||||
|
onChange={(event) => reset.setPw(event.target.value)}
|
||||||
|
required
|
||||||
|
after={
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
className="al-eye"
|
||||||
|
aria-label={t('native.claim.showPassword')}
|
||||||
|
aria-pressed={reset.showPw}
|
||||||
|
onClick={() => reset.setShowPw((visible) => !visible)}
|
||||||
|
>
|
||||||
|
{reset.showPw ? <EyeOff size={18} aria-hidden="true" /> : <Eye size={18} aria-hidden="true" />}
|
||||||
|
</button>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
<PasswordChecklist password={reset.pw} className="al-check" tone="light" />
|
||||||
|
<Field
|
||||||
|
label={t('login.confirmPassword')}
|
||||||
|
type={inputType}
|
||||||
|
name="confirm-password"
|
||||||
|
autoComplete="new-password"
|
||||||
|
value={reset.pw2}
|
||||||
|
onChange={(event) => reset.setPw2(event.target.value)}
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
<button type="submit" className="al-cta" disabled={reset.isLoading}>
|
||||||
|
{reset.isLoading && <span className="al-spin" aria-hidden="true" />}
|
||||||
|
{reset.isLoading ? t('common.loading') : action}
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -132,6 +132,32 @@ describe('useResetPassword', () => {
|
|||||||
expect(result.current.success).toBe(false);
|
expect(result.current.success).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it.each([
|
||||||
|
'Invalid or expired reset link',
|
||||||
|
'This reset link has already been used',
|
||||||
|
'Reset link has expired. Please request a new one.',
|
||||||
|
])('stops retrying a link refused by the server (%s)', async (error) => {
|
||||||
|
vi.mocked(authApi.resetPassword).mockResolvedValueOnce({ mfa_required: true } as never);
|
||||||
|
vi.mocked(authApi.resetPassword).mockRejectedValueOnce({ response: { data: { error } } });
|
||||||
|
const { result, rerender } = renderHook(() => useResetPassword());
|
||||||
|
|
||||||
|
await submit(result, 'Longenough1!');
|
||||||
|
act(() => result.current.setMfaCode('123456'));
|
||||||
|
await act(() => result.current.handleSubmit(submitEvent()));
|
||||||
|
|
||||||
|
expect(result.current.linkInvalid).toBe(true);
|
||||||
|
expect(result.current.pw).toBe('');
|
||||||
|
expect(result.current.pw2).toBe('');
|
||||||
|
expect(result.current.mfaCode).toBe('');
|
||||||
|
expect(result.current.mfaRequired).toBe(false);
|
||||||
|
await act(() => result.current.handleSubmit(submitEvent()));
|
||||||
|
expect(authApi.resetPassword).toHaveBeenCalledTimes(2);
|
||||||
|
|
||||||
|
search = new URLSearchParams('token=fresh-link');
|
||||||
|
rerender();
|
||||||
|
expect(result.current.linkInvalid).toBe(false);
|
||||||
|
});
|
||||||
|
|
||||||
it('FE-PAGE-RESET-011: surfaces a plain Error message as-is', async () => {
|
it('FE-PAGE-RESET-011: surfaces a plain Error message as-is', async () => {
|
||||||
vi.mocked(authApi.resetPassword).mockRejectedValueOnce(new Error('Network Error'));
|
vi.mocked(authApi.resetPassword).mockRejectedValueOnce(new Error('Network Error'));
|
||||||
const { result } = renderHook(() => useResetPassword());
|
const { result } = renderHook(() => useResetPassword());
|
||||||
|
|||||||
@@ -5,11 +5,17 @@ import { getApiErrorMessage } from '../../types'
|
|||||||
import { useTranslation } from '../../i18n'
|
import { useTranslation } from '../../i18n'
|
||||||
import { passwordErrorKey } from '../../utils/passwordError'
|
import { passwordErrorKey } from '../../utils/passwordError'
|
||||||
|
|
||||||
|
// Published TREK servers report these refusals as messages, without an error code.
|
||||||
|
const unusableLinkErrors = new Set([
|
||||||
|
'Invalid or expired reset link',
|
||||||
|
'This reset link has already been used',
|
||||||
|
'Reset link has expired. Please request a new one.',
|
||||||
|
])
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reset-password data hook — owns the token lookup, the form state, the
|
* Reset-password data hook — owns the token lookup, the form state, the
|
||||||
* client-side validation and the submit (incl. the MFA step-up branch).
|
* client-side validation and the submit (incl. the MFA step-up branch).
|
||||||
* ResetPasswordPage is a pure wiring container. Behaviour is identical to the
|
* ResetPasswordPage is a pure wiring container.
|
||||||
* previous in-component logic.
|
|
||||||
*/
|
*/
|
||||||
export function useResetPassword() {
|
export function useResetPassword() {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
@@ -23,8 +29,10 @@ export function useResetPassword() {
|
|||||||
const [mfaCode, setMfaCode] = useState('')
|
const [mfaCode, setMfaCode] = useState('')
|
||||||
const [mfaRequired, setMfaRequired] = useState(false)
|
const [mfaRequired, setMfaRequired] = useState(false)
|
||||||
const [error, setError] = useState('')
|
const [error, setError] = useState('')
|
||||||
|
const [unusableToken, setUnusableToken] = useState<string | null>(null)
|
||||||
const [success, setSuccess] = useState(false)
|
const [success, setSuccess] = useState(false)
|
||||||
const [isLoading, setIsLoading] = useState(false)
|
const [isLoading, setIsLoading] = useState(false)
|
||||||
|
const linkInvalid = unusableToken === token
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!token) setError(t('login.resetPasswordInvalidLink'))
|
if (!token) setError(t('login.resetPasswordInvalidLink'))
|
||||||
@@ -34,7 +42,7 @@ export function useResetPassword() {
|
|||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
if (isLoading) return
|
if (isLoading) return
|
||||||
setError('')
|
setError('')
|
||||||
if (!token) return
|
if (!token || linkInvalid) return
|
||||||
const weak = passwordErrorKey(pw)
|
const weak = passwordErrorKey(pw)
|
||||||
if (weak) { setError(t(weak)); return }
|
if (weak) { setError(t(weak)); return }
|
||||||
if (pw !== pw2) { setError(t('login.passwordsDontMatch')); return }
|
if (pw !== pw2) { setError(t('login.passwordsDontMatch')); return }
|
||||||
@@ -54,13 +62,23 @@ export function useResetPassword() {
|
|||||||
setSuccess(true)
|
setSuccess(true)
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
setError(getApiErrorMessage(err, t('login.resetPasswordFailed')))
|
const message = getApiErrorMessage(err, t('login.resetPasswordFailed'))
|
||||||
|
if (unusableLinkErrors.has(message)) {
|
||||||
|
setUnusableToken(token)
|
||||||
|
setPw('')
|
||||||
|
setPw2('')
|
||||||
|
setShowPw(false)
|
||||||
|
setMfaCode('')
|
||||||
|
setMfaRequired(false)
|
||||||
|
} else {
|
||||||
|
setError(message)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
setIsLoading(false)
|
setIsLoading(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
navigate, token,
|
navigate, token, linkInvalid,
|
||||||
pw, setPw, pw2, setPw2, showPw, setShowPw,
|
pw, setPw, pw2, setPw2, showPw, setShowPw,
|
||||||
mfaCode, setMfaCode, mfaRequired, error, success, isLoading,
|
mfaCode, setMfaCode, mfaRequired, error, success, isLoading,
|
||||||
handleSubmit,
|
handleSubmit,
|
||||||
|
|||||||
@@ -0,0 +1,105 @@
|
|||||||
|
import { fireEvent, waitFor } from '@testing-library/react';
|
||||||
|
import { afterEach, expect, it, vi } from 'vitest';
|
||||||
|
|
||||||
|
const mocks = vi.hoisted(() => ({
|
||||||
|
agreement: vi.fn(),
|
||||||
|
purchase: vi.fn().mockResolvedValue({ kind: 'cancelled' }),
|
||||||
|
}));
|
||||||
|
|
||||||
|
vi.mock('@capacitor/app', () => ({ App: { addListener: vi.fn() } }));
|
||||||
|
vi.mock('@capacitor/core', async (importOriginal) => ({
|
||||||
|
...(await importOriginal<typeof import('@capacitor/core')>()),
|
||||||
|
CapacitorHttp: { get: mocks.agreement },
|
||||||
|
}));
|
||||||
|
vi.mock('@capacitor/splash-screen', () => ({ SplashScreen: { hide: vi.fn().mockResolvedValue(undefined) } }));
|
||||||
|
vi.mock('../../../native-shell/scenery', () => ({
|
||||||
|
WELCOME_CAMERA: [0, 0],
|
||||||
|
cameraForPlan: () => [0, 0],
|
||||||
|
startScenery: () => null,
|
||||||
|
}));
|
||||||
|
vi.mock('../../../src/native/trekShell', () => ({
|
||||||
|
TrekShell: {
|
||||||
|
getServer: vi.fn().mockResolvedValue({ url: null }),
|
||||||
|
requestServer: vi.fn(async ({ url }: { url: string }) => ({
|
||||||
|
status: 200,
|
||||||
|
url,
|
||||||
|
data:
|
||||||
|
new URL(url).pathname === '/api/plans'
|
||||||
|
? {
|
||||||
|
ordering: 'open',
|
||||||
|
plans: [{ id: 'plus', name: 'Plus', storageGb: 50, aiDocumentLimit: null }],
|
||||||
|
}
|
||||||
|
: { available: true },
|
||||||
|
})),
|
||||||
|
},
|
||||||
|
}));
|
||||||
|
vi.mock('../../../src/native/iap', async (importOriginal) => ({
|
||||||
|
...(await importOriginal<typeof import('../../../src/native/iap')>()),
|
||||||
|
getIapClient: () => ({
|
||||||
|
isAvailable: async () => true,
|
||||||
|
products: async () => new Map([['cloud.plus.monthly', { displayPrice: '$11.99', freeTrial: true }]]),
|
||||||
|
held: async () => false,
|
||||||
|
onTransaction: vi.fn(),
|
||||||
|
unfinished: async () => null,
|
||||||
|
purchase: mocks.purchase,
|
||||||
|
}),
|
||||||
|
}));
|
||||||
|
|
||||||
|
const agreement = { status: 200, data: { version: '2026-12-01', deviations: 'First agreement' } };
|
||||||
|
|
||||||
|
function element<T extends HTMLElement>(selector: string): T {
|
||||||
|
const found = document.querySelector<T>(selector);
|
||||||
|
if (!found) throw new Error(`The app did not show ${selector}`);
|
||||||
|
return found;
|
||||||
|
}
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
vi.unstubAllGlobals();
|
||||||
|
document.body.replaceChildren();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('keeps the store closed for a withdrawn agreement and asks again when the version changes', async () => {
|
||||||
|
vi.stubGlobal('matchMedia', () => ({ matches: false, addEventListener: vi.fn() }));
|
||||||
|
vi.stubGlobal('cancelAnimationFrame', vi.fn());
|
||||||
|
document.body.append(Object.assign(document.createElement('main'), { id: 'shell' }));
|
||||||
|
const changed = { status: 200, data: { version: '2026-12-02', deviations: 'Updated agreement' } };
|
||||||
|
mocks.agreement
|
||||||
|
.mockResolvedValueOnce(agreement)
|
||||||
|
.mockResolvedValueOnce({ status: 503, data: { code: 'ordering-closed' } })
|
||||||
|
.mockResolvedValueOnce(agreement)
|
||||||
|
.mockResolvedValue(changed);
|
||||||
|
|
||||||
|
await import('../../../native-shell/main');
|
||||||
|
await waitFor(() => expect(element<HTMLElement>('.trial-badge').hidden).toBe(false));
|
||||||
|
fireEvent.click(element('button.discover'));
|
||||||
|
await waitFor(() => expect(element<HTMLButtonElement>('.dock button.cta').hidden).toBe(false));
|
||||||
|
fireEvent.click(element('.dock button.cta'));
|
||||||
|
|
||||||
|
const consent = await waitFor(() => {
|
||||||
|
expect(element('.consent-text').textContent).toBe(agreement.data.deviations);
|
||||||
|
return element<HTMLInputElement>('.consent input');
|
||||||
|
});
|
||||||
|
fireEvent.input(element('.form input[type="text"]'), { target: { value: 'sample-journey' } });
|
||||||
|
fireEvent.input(element('.form input[type="email"]'), { target: { value: 'buyer@example.invalid' } });
|
||||||
|
fireEvent.input(element('.form input[type="password"]'), { target: { value: 'Training#Pass123' } });
|
||||||
|
const submit = element<HTMLButtonElement>('.dock button.cta');
|
||||||
|
fireEvent.click(consent);
|
||||||
|
fireEvent.click(submit);
|
||||||
|
await waitFor(() => {
|
||||||
|
expect(consent.disabled).toBe(true);
|
||||||
|
expect(consent.checked).toBe(false);
|
||||||
|
});
|
||||||
|
expect(mocks.purchase).not.toHaveBeenCalled();
|
||||||
|
|
||||||
|
fireEvent.click(submit);
|
||||||
|
await waitFor(() => expect(element('.consent-text').textContent).toBe(agreement.data.deviations));
|
||||||
|
fireEvent.click(consent);
|
||||||
|
fireEvent.click(submit);
|
||||||
|
await waitFor(() => expect(element('.consent-text').textContent).toBe(changed.data.deviations));
|
||||||
|
expect(consent.checked).toBe(false);
|
||||||
|
expect(mocks.purchase).not.toHaveBeenCalled();
|
||||||
|
|
||||||
|
fireEvent.click(consent);
|
||||||
|
fireEvent.click(submit);
|
||||||
|
await waitFor(() => expect(mocks.purchase).toHaveBeenCalledExactlyOnceWith('cloud.plus.monthly', '$11.99'));
|
||||||
|
});
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
"src/db/repositories/CollabPollVotes.repository.ts": 1,
|
"src/db/repositories/CollabPollVotes.repository.ts": 1,
|
||||||
"src/db/repositories/DawarichConnections.repository.ts": 4,
|
"src/db/repositories/DawarichConnections.repository.ts": 4,
|
||||||
"src/db/repositories/DawarichVisitSuggestions.repository.ts": 4,
|
"src/db/repositories/DawarichVisitSuggestions.repository.ts": 4,
|
||||||
"src/db/repositories/DayAccommodations.repository.ts": 11,
|
"src/db/repositories/DayAccommodations.repository.ts": 12,
|
||||||
"src/db/repositories/DayAssignments.repository.ts": 20,
|
"src/db/repositories/DayAssignments.repository.ts": 20,
|
||||||
"src/db/repositories/DayNotes.repository.ts": 6,
|
"src/db/repositories/DayNotes.repository.ts": 6,
|
||||||
"src/db/repositories/Days.repository.ts": 7,
|
"src/db/repositories/Days.repository.ts": 7,
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
"src/db/repositories/PushSubscriptions.repository.ts": 1,
|
"src/db/repositories/PushSubscriptions.repository.ts": 1,
|
||||||
"src/db/repositories/ReservationDayPositions.repository.ts": 1,
|
"src/db/repositories/ReservationDayPositions.repository.ts": 1,
|
||||||
"src/db/repositories/ReservationEndpoints.repository.ts": 5,
|
"src/db/repositories/ReservationEndpoints.repository.ts": 5,
|
||||||
"src/db/repositories/Reservations.repository.ts": 13,
|
"src/db/repositories/Reservations.repository.ts": 14,
|
||||||
"src/db/repositories/ReservationTravelers.repository.ts": 2,
|
"src/db/repositories/ReservationTravelers.repository.ts": 2,
|
||||||
"src/db/repositories/RoadtripDayBoundaries.repository.ts": 3,
|
"src/db/repositories/RoadtripDayBoundaries.repository.ts": 3,
|
||||||
"src/db/repositories/RoadtripDayTracks.repository.ts": 1,
|
"src/db/repositories/RoadtripDayTracks.repository.ts": 1,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"scripts/db-call-graph.mjs": 1036,
|
"scripts/db-call-graph.mjs": 1036,
|
||||||
"scripts/generate-entities.ts": 2259,
|
"scripts/generate-entities.ts": 2259,
|
||||||
"src/db/repositories/Places.repository.ts": 1432,
|
"src/db/repositories/Places.repository.ts": 1432,
|
||||||
"src/db/repositories/Reservations.repository.ts": 1538,
|
"src/db/repositories/Reservations.repository.ts": 1550,
|
||||||
"src/db/repositories/Trips.repository.ts": 1120,
|
"src/db/repositories/Trips.repository.ts": 1120,
|
||||||
"src/db/repositories/Users.repository.ts": 1403,
|
"src/db/repositories/Users.repository.ts": 1403,
|
||||||
"src/nest/atlas/atlas.service.ts": 1166,
|
"src/nest/atlas/atlas.service.ts": 1166,
|
||||||
@@ -15,6 +15,6 @@
|
|||||||
"src/nest/places/places.service.ts": 1517,
|
"src/nest/places/places.service.ts": 1517,
|
||||||
"src/nest/plugins/plugin-runtime.service.ts": 1458,
|
"src/nest/plugins/plugin-runtime.service.ts": 1458,
|
||||||
"src/nest/plugins/runtime/plugin-sdk.ts": 1093,
|
"src/nest/plugins/runtime/plugin-sdk.ts": 1093,
|
||||||
"src/nest/reservations/reservations.service.ts": 1159,
|
"src/nest/reservations/reservations.service.ts": 1163,
|
||||||
"src/nest/vacay/vacay.service.ts": 1393
|
"src/nest/vacay/vacay.service.ts": 1393
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,8 +121,13 @@ export class DayAccommodationsRepository extends TrekRepository<DayAccommodation
|
|||||||
.execute('run');
|
.execute('run');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** RS30/RS43 — `UPDATE day_accommodations SET confirmation = COALESCE(?, confirmation) WHERE id = ?`. */
|
||||||
async patchConfirmation(id: number, confirmation: string | null): Promise<void> {
|
async patchConfirmation(id: number, confirmation: string | null): Promise<void> {
|
||||||
await this.nativeUpdate({ id }, { confirmation });
|
const platform = this.getEntityManager().getPlatform();
|
||||||
|
await this.qb()
|
||||||
|
.update({ confirmation: coalesceOverride(platform, confirmation, 'confirmation') })
|
||||||
|
.where({ id })
|
||||||
|
.execute('run');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -154,7 +159,14 @@ export class DayAccommodationsRepository extends TrekRepository<DayAccommodation
|
|||||||
return row?.check_in;
|
return row?.check_in;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** An omitted confirmation leaves the stay's existing reference in place. */
|
/**
|
||||||
|
* RS39 — `UPDATE day_accommodations SET place_id = ?, start_day_id = ?,
|
||||||
|
* end_day_id = ?, check_in = ?, check_out = ?, confirmation = ? WHERE id =
|
||||||
|
* ?`. Six columns (no `check_in_end`/`notes`, unlike `AccommodationsService
|
||||||
|
* .moveStay`'s own write) — the caller's already-decided values, written
|
||||||
|
* verbatim (the `PlacesRepository.updatePlace`/PL11 precedent: no SQL-side
|
||||||
|
* COALESCE here, the legacy statement itself has none for these columns).
|
||||||
|
*/
|
||||||
async updateFromBooking(
|
async updateFromBooking(
|
||||||
id: number,
|
id: number,
|
||||||
write: {
|
write: {
|
||||||
@@ -163,7 +175,7 @@ export class DayAccommodationsRepository extends TrekRepository<DayAccommodation
|
|||||||
end_day_id: number;
|
end_day_id: number;
|
||||||
check_in: string | null;
|
check_in: string | null;
|
||||||
check_out: string | null;
|
check_out: string | null;
|
||||||
confirmation?: string | null;
|
confirmation: string | null;
|
||||||
},
|
},
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
await this.nativeUpdate(
|
await this.nativeUpdate(
|
||||||
@@ -174,7 +186,7 @@ export class DayAccommodationsRepository extends TrekRepository<DayAccommodation
|
|||||||
endDay: write.end_day_id,
|
endDay: write.end_day_id,
|
||||||
check_in: write.check_in,
|
check_in: write.check_in,
|
||||||
check_out: write.check_out,
|
check_out: write.check_out,
|
||||||
...(write.confirmation !== undefined ? { confirmation: write.confirmation } : {}),
|
confirmation: write.confirmation,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -331,7 +343,7 @@ export class DayAccommodationsRepository extends TrekRepository<DayAccommodation
|
|||||||
check_in: string | null;
|
check_in: string | null;
|
||||||
check_in_end: string | null;
|
check_in_end: string | null;
|
||||||
check_out: string | null;
|
check_out: string | null;
|
||||||
confirmation?: string | null;
|
confirmation: string | null;
|
||||||
notes: string | null;
|
notes: string | null;
|
||||||
},
|
},
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
@@ -344,7 +356,7 @@ export class DayAccommodationsRepository extends TrekRepository<DayAccommodation
|
|||||||
check_in: write.check_in,
|
check_in: write.check_in,
|
||||||
check_in_end: write.check_in_end,
|
check_in_end: write.check_in_end,
|
||||||
check_out: write.check_out,
|
check_out: write.check_out,
|
||||||
...(write.confirmation !== undefined ? { confirmation: write.confirmation } : {}),
|
confirmation: write.confirmation,
|
||||||
notes: write.notes,
|
notes: write.notes,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import type { Reservations } from '../entities/Reservations.entity';
|
import type { Reservations } from '../entities/Reservations.entity';
|
||||||
import { DayAssignments } from '../entities/DayAssignments.entity';
|
import { DayAssignments } from '../entities/DayAssignments.entity';
|
||||||
import { Days } from '../entities/Days.entity';
|
import { Days } from '../entities/Days.entity';
|
||||||
import { columnRef, dayDistance, isCalendarDate } from '../dialect/sql-functions';
|
import { coalesceOverride, columnRef, dayDistance, isCalendarDate } from '../dialect/sql-functions';
|
||||||
import { concatKysely, startsWithIsoDateKysely, substringKysely } from '../dialect/kysely-functions';
|
import { concatKysely, startsWithIsoDateKysely, substringKysely } from '../dialect/kysely-functions';
|
||||||
import { accommodationIdMatches, reservationStayIs } from './_shared/reservation-accommodation';
|
import { accommodationIdMatches, reservationStayIs } from './_shared/reservation-accommodation';
|
||||||
import { publicReservationExpr, publicStayExists, type ReservationVisibilityKyselyDB } from './_shared/reservation-visibility';
|
import { publicReservationExpr, publicStayExists, type ReservationVisibilityKyselyDB } from './_shared/reservation-visibility';
|
||||||
@@ -663,14 +663,24 @@ export class ReservationsRepository extends TrekRepository<Reservations> {
|
|||||||
// Reservations repositories where a read belongs there").
|
// Reservations repositories where a read belongs there").
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
/** The partner hotel booking created with a stay. The caller decides its initial status. */
|
/**
|
||||||
|
* AC33 (`AccommodationsService.createAccommodation`) — `INSERT INTO
|
||||||
|
* reservations (trip_id, day_id, title, reservation_time, location,
|
||||||
|
* confirmation_number, notes, status, type, accommodation_id, metadata)
|
||||||
|
* VALUES (?, ?, ?, ?, ?, ?, ?, 'confirmed', 'hotel', ?, ?)` — the
|
||||||
|
* auto-created partner hotel booking. `status`/`type` literals, `location`
|
||||||
|
* always `null` (matching the legacy statement exactly — it never binds a
|
||||||
|
* value there). `accommodation_id: string` — R2: the caller stringifies
|
||||||
|
* the new stay's numeric id (`String(newId)`) the same way `insertReservation`'s
|
||||||
|
* own `accommodation_id` caller already does, so SQLite's TEXT-affinity
|
||||||
|
* storage is identical to the legacy raw bind of the bare number.
|
||||||
|
*/
|
||||||
async insertHotelPartner(input: {
|
async insertHotelPartner(input: {
|
||||||
trip_id: number | string;
|
trip_id: number | string;
|
||||||
day_id: number;
|
day_id: number;
|
||||||
title: string;
|
title: string;
|
||||||
reservation_time: string | null;
|
reservation_time: string | null;
|
||||||
confirmation_number: string | null;
|
confirmation_number: string | null;
|
||||||
status: 'pending' | 'confirmed';
|
|
||||||
notes: string | null;
|
notes: string | null;
|
||||||
accommodation_id: string;
|
accommodation_id: string;
|
||||||
metadata: string | null;
|
metadata: string | null;
|
||||||
@@ -683,7 +693,8 @@ export class ReservationsRepository extends TrekRepository<Reservations> {
|
|||||||
location: null,
|
location: null,
|
||||||
confirmation_number: input.confirmation_number,
|
confirmation_number: input.confirmation_number,
|
||||||
notes: input.notes,
|
notes: input.notes,
|
||||||
status: input.status,
|
// A stay without a confirmation number is not a confirmed booking yet.
|
||||||
|
status: input.confirmation_number ? 'confirmed' : 'pending',
|
||||||
type: 'hotel',
|
type: 'hotel',
|
||||||
accommodation_id: input.accommodation_id,
|
accommodation_id: input.accommodation_id,
|
||||||
metadata: input.metadata,
|
metadata: input.metadata,
|
||||||
@@ -708,23 +719,24 @@ export class ReservationsRepository extends TrekRepository<Reservations> {
|
|||||||
return rows as { id: number; metadata: string | null }[];
|
return rows as { id: number; metadata: string | null }[];
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Clearing a reference reopens a confirmed booking that actually held a reference. */
|
/**
|
||||||
async setMetadataAndConfirmation(id: number, metadata: string, confirmation?: string | null): Promise<void> {
|
* AC38 (`AccommodationsService.updateAccommodation`) — `UPDATE
|
||||||
await this.kysely<Pick<DB, 'reservations'>>()
|
* reservations SET metadata = ?, confirmation_number = COALESCE(?,
|
||||||
.updateTable('reservations')
|
* confirmation_number) WHERE id = ?`. Runs AFTER `updateAccommodation`'s
|
||||||
.set((eb) => ({
|
* own transaction commits (§18.6 — R5 class, flagged not fixed).
|
||||||
|
* `coalesceOverride` for the value-side COALESCE — the bound `?` FIRST,
|
||||||
|
* the column the fallback, so the new value wins
|
||||||
|
* (`DayAccommodationsRepository.patchConfirmation`'s precedent).
|
||||||
|
*/
|
||||||
|
async setMetadataAndConfirmation(id: number, metadata: string, confirmation: string | null): Promise<void> {
|
||||||
|
const platform = this.getEntityManager().getPlatform();
|
||||||
|
await this.qb()
|
||||||
|
.update({
|
||||||
metadata,
|
metadata,
|
||||||
confirmation_number: confirmation,
|
confirmation_number: coalesceOverride(platform, confirmation, 'confirmation_number'),
|
||||||
status: confirmation === null
|
})
|
||||||
? eb.case()
|
.where({ id })
|
||||||
.when(eb.and([eb('status', '=', 'confirmed'), eb('confirmation_number', '!=', '')]))
|
.execute('run');
|
||||||
.then('pending')
|
|
||||||
.else(eb.ref('status'))
|
|
||||||
.end()
|
|
||||||
: undefined,
|
|
||||||
}))
|
|
||||||
.where('id', '=', id)
|
|
||||||
.execute();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** A pending hotel booking turns confirmed once its stay gets a confirmation number; other statuses stay. */
|
/** A pending hotel booking turns confirmed once its stay gets a confirmation number; other statuses stay. */
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ export class AccommodationsMcp {
|
|||||||
check_in: z.string().max(10).optional(),
|
check_in: z.string().max(10).optional(),
|
||||||
check_in_end: z.string().max(10).optional().describe('Check-in window end time e.g. "20:00"'),
|
check_in_end: z.string().max(10).optional().describe('Check-in window end time e.g. "20:00"'),
|
||||||
check_out: z.string().max(10).optional(),
|
check_out: z.string().max(10).optional(),
|
||||||
confirmation: z.string().max(100).nullable().optional().describe('Booking reference, or null to clear it'),
|
confirmation: z.string().max(100).optional(),
|
||||||
notes: z.string().max(1000).optional(),
|
notes: z.string().max(1000).optional(),
|
||||||
},
|
},
|
||||||
annotations: TOOL_ANNOTATIONS_WRITE,
|
annotations: TOOL_ANNOTATIONS_WRITE,
|
||||||
@@ -285,7 +285,7 @@ export class AccommodationsMcp {
|
|||||||
check_in?: string;
|
check_in?: string;
|
||||||
check_in_end?: string;
|
check_in_end?: string;
|
||||||
check_out?: string;
|
check_out?: string;
|
||||||
confirmation?: string | null;
|
confirmation?: string;
|
||||||
notes?: string;
|
notes?: string;
|
||||||
},
|
},
|
||||||
ctx: McpContext,
|
ctx: McpContext,
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ export class AccommodationsRpc {
|
|||||||
check_in?: string;
|
check_in?: string;
|
||||||
check_in_end?: string;
|
check_in_end?: string;
|
||||||
check_out?: string;
|
check_out?: string;
|
||||||
confirmation?: string | null;
|
confirmation?: string;
|
||||||
notes?: string;
|
notes?: string;
|
||||||
};
|
};
|
||||||
// The input is open: a ref is read like a plugin RPC id, so '0x1' or 1.5 is BAD_PARAMS, not bound.
|
// The input is open: a ref is read like a plugin RPC id, so '0x1' or 1.5 is BAD_PARAMS, not bound.
|
||||||
|
|||||||
@@ -112,13 +112,6 @@ const stayNotFound = () => new DomainError(404, 'Accommodation not found', { mcp
|
|||||||
|
|
||||||
const STAY_REFS = ['place_id', 'start_day_id', 'end_day_id'] as const;
|
const STAY_REFS = ['place_id', 'start_day_id', 'end_day_id'] as const;
|
||||||
|
|
||||||
function looksLikeBookingReference(confirmation: string | null | undefined): boolean {
|
|
||||||
if (!confirmation) return false;
|
|
||||||
const compact = confirmation.toLowerCase().replace(/[./_ -]/g, '');
|
|
||||||
if (compact === 'tbd' || compact === 'na' || compact === 'notbookedyet') return false;
|
|
||||||
return /^[\p{L}\p{N}]+(?:[./_-][\p{L}\p{N}]+)*$/u.test(confirmation) || /^\p{N}+(?: +\p{N}+)+$/u.test(confirmation);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The place and day refs of a stay write, each read with toRowId; an absent one
|
* The place and day refs of a stay write, each read with toRowId; an absent one
|
||||||
* stays absent. A value it refuses ('0x1', '1e0', 1.5) is a 400 in the words the
|
* stays absent. A value it refuses ('0x1', '1e0', 1.5) is a 400 in the words the
|
||||||
@@ -144,7 +137,7 @@ export interface CreateAccommodationData {
|
|||||||
check_in?: string;
|
check_in?: string;
|
||||||
check_in_end?: string;
|
check_in_end?: string;
|
||||||
check_out?: string;
|
check_out?: string;
|
||||||
confirmation?: string | null;
|
confirmation?: string;
|
||||||
notes?: string;
|
notes?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -785,7 +778,6 @@ export class AccommodationsService {
|
|||||||
|
|
||||||
async createAccommodation(tripId: string | number, data: CreateAccommodationData) {
|
async createAccommodation(tripId: string | number, data: CreateAccommodationData) {
|
||||||
const { place_id, start_day_id, end_day_id, check_in, check_in_end, check_out, confirmation, notes } = data;
|
const { place_id, start_day_id, end_day_id, check_in, check_in_end, check_out, confirmation, notes } = data;
|
||||||
const reference = confirmation?.trim() || null;
|
|
||||||
|
|
||||||
// The stay, its partner hotel reservation and the day stop it implies are one
|
// The stay, its partner hotel reservation and the day stop it implies are one
|
||||||
// logical write, and an atomic one, so a failed insert halfway can't leave an orphan.
|
// logical write, and an atomic one, so a failed insert halfway can't leave an orphan.
|
||||||
@@ -799,7 +791,7 @@ export class AccommodationsService {
|
|||||||
check_in: check_in || null,
|
check_in: check_in || null,
|
||||||
check_in_end: check_in_end || null,
|
check_in_end: check_in_end || null,
|
||||||
check_out: check_out || null,
|
check_out: check_out || null,
|
||||||
confirmation: reference,
|
confirmation: confirmation || null,
|
||||||
notes: notes || null,
|
notes: notes || null,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -818,8 +810,7 @@ export class AccommodationsService {
|
|||||||
day_id: start_day_id,
|
day_id: start_day_id,
|
||||||
title: placeName,
|
title: placeName,
|
||||||
reservation_time: startDayDate || null,
|
reservation_time: startDayDate || null,
|
||||||
confirmation_number: reference,
|
confirmation_number: confirmation || null,
|
||||||
status: looksLikeBookingReference(reference) ? 'confirmed' : 'pending',
|
|
||||||
notes: notes || null,
|
notes: notes || null,
|
||||||
accommodation_id: legacyBoundIntegerText(newId),
|
accommodation_id: legacyBoundIntegerText(newId),
|
||||||
metadata: Object.keys(meta).length > 0 ? encodeJson(RESERVATION_METADATA, meta) : null,
|
metadata: Object.keys(meta).length > 0 ? encodeJson(RESERVATION_METADATA, meta) : null,
|
||||||
@@ -841,14 +832,14 @@ export class AccommodationsService {
|
|||||||
return await this.dayAccommodationsRepo.findInTrip(idNum, tripIdNum);
|
return await this.dayAccommodationsRepo.findInTrip(idNum, tripIdNum);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async syncLinkedReservation(
|
/**
|
||||||
id: number,
|
* Writes a stay's times and confirmation number onto one linked booking. A number
|
||||||
metadata: string,
|
* also confirms the booking when it was still pending, and that has to come after
|
||||||
confirmation: string | null | undefined,
|
* the write, so both steps stay together here for each booking.
|
||||||
shouldConfirm: boolean,
|
*/
|
||||||
): Promise<void> {
|
private async syncLinkedReservation(id: number, metadata: string, confirmation: string | null): Promise<void> {
|
||||||
await this.reservationsRepo.setMetadataAndConfirmation(id, metadata, confirmation);
|
await this.reservationsRepo.setMetadataAndConfirmation(id, metadata, confirmation);
|
||||||
if (shouldConfirm) await this.reservationsRepo.confirmIfPending(id);
|
if (confirmation) await this.reservationsRepo.confirmIfPending(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
async updateAccommodation(
|
async updateAccommodation(
|
||||||
@@ -861,7 +852,7 @@ export class AccommodationsService {
|
|||||||
check_in?: string;
|
check_in?: string;
|
||||||
check_in_end?: string;
|
check_in_end?: string;
|
||||||
check_out?: string;
|
check_out?: string;
|
||||||
confirmation?: string | null;
|
confirmation?: string;
|
||||||
notes?: string;
|
notes?: string;
|
||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
@@ -871,9 +862,7 @@ export class AccommodationsService {
|
|||||||
const newCheckIn = fields.check_in !== undefined ? fields.check_in : existing.check_in;
|
const newCheckIn = fields.check_in !== undefined ? fields.check_in : existing.check_in;
|
||||||
const newCheckInEnd = fields.check_in_end !== undefined ? fields.check_in_end : existing.check_in_end;
|
const newCheckInEnd = fields.check_in_end !== undefined ? fields.check_in_end : existing.check_in_end;
|
||||||
const newCheckOut = fields.check_out !== undefined ? fields.check_out : existing.check_out;
|
const newCheckOut = fields.check_out !== undefined ? fields.check_out : existing.check_out;
|
||||||
const confirmation = fields.confirmation === undefined ? undefined : fields.confirmation?.trim() || null;
|
const newConfirmation = fields.confirmation !== undefined ? fields.confirmation : existing.confirmation;
|
||||||
// Saving a stay form can resend its current reference. Mirror it without overriding the chosen status.
|
|
||||||
const shouldConfirm = looksLikeBookingReference(confirmation) && confirmation !== existing.confirmation?.trim();
|
|
||||||
const newNotes = fields.notes !== undefined ? fields.notes : existing.notes;
|
const newNotes = fields.notes !== undefined ? fields.notes : existing.notes;
|
||||||
|
|
||||||
// The stay row, the day stop that mirrors it and the linked bookings' times all
|
// The stay row, the day stop that mirrors it and the linked bookings' times all
|
||||||
@@ -890,7 +879,7 @@ export class AccommodationsService {
|
|||||||
check_in: newCheckIn,
|
check_in: newCheckIn,
|
||||||
check_in_end: newCheckInEnd,
|
check_in_end: newCheckInEnd,
|
||||||
check_out: newCheckOut,
|
check_out: newCheckOut,
|
||||||
confirmation,
|
confirmation: newConfirmation,
|
||||||
notes: newNotes,
|
notes: newNotes,
|
||||||
});
|
});
|
||||||
const moved = await this.remirrorStay(existing.id, newPlaceId, newStartDayId, newCheckIn, {
|
const moved = await this.remirrorStay(existing.id, newPlaceId, newStartDayId, newCheckIn, {
|
||||||
@@ -907,7 +896,7 @@ export class AccommodationsService {
|
|||||||
if (newCheckIn) meta.check_in_time = newCheckIn;
|
if (newCheckIn) meta.check_in_time = newCheckIn;
|
||||||
if (newCheckInEnd) meta.check_in_end_time = newCheckInEnd;
|
if (newCheckInEnd) meta.check_in_end_time = newCheckInEnd;
|
||||||
if (newCheckOut) meta.check_out_time = newCheckOut;
|
if (newCheckOut) meta.check_out_time = newCheckOut;
|
||||||
await this.syncLinkedReservation(res.id, encodeJson(RESERVATION_METADATA, meta), confirmation, shouldConfirm);
|
await this.syncLinkedReservation(res.id, encodeJson(RESERVATION_METADATA, meta), newConfirmation || null);
|
||||||
}
|
}
|
||||||
return moved;
|
return moved;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -35,8 +35,6 @@ import {
|
|||||||
type TrekCard,
|
type TrekCard,
|
||||||
} from '@trek/shared';
|
} from '@trek/shared';
|
||||||
|
|
||||||
import { isDeepStrictEqual } from 'node:util';
|
|
||||||
|
|
||||||
type ToolArgs = Record<string, unknown>;
|
type ToolArgs = Record<string, unknown>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -141,7 +139,6 @@ interface AgentOutcome {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const TOO_MANY_CHANGES = `Too many changes in one step: propose at most ${MAX_WRITES_PER_STEP} at once.`;
|
const TOO_MANY_CHANGES = `Too many changes in one step: propose at most ${MAX_WRITES_PER_STEP} at once.`;
|
||||||
const CHANGE_ALREADY_PROPOSED = 'This exact change is already waiting for approval.';
|
|
||||||
const TOO_MANY_LOOKUPS = `Too many lookups in one step: make at most ${MAX_READS_PER_STEP} at once.`;
|
const TOO_MANY_LOOKUPS = `Too many lookups in one step: make at most ${MAX_READS_PER_STEP} at once.`;
|
||||||
|
|
||||||
/** What a step collects while its calls run: its parts, and the weather its lookups found. */
|
/** What a step collects while its calls run: its parts, and the weather its lookups found. */
|
||||||
@@ -498,9 +495,7 @@ async function runCalls(turn: Turn, calls: AiToolCall[], collected: StepParts):
|
|||||||
const unknownPlace = 'error' in prepared ? null : placeIdRefusal(call.name, prepared.args, turn.knownPlaceIds);
|
const unknownPlace = 'error' in prepared ? null : placeIdRefusal(call.name, prepared.args, turn.knownPlaceIds);
|
||||||
if (unknownPlace) prepared = { error: unknownPlace };
|
if (unknownPlace) prepared = { error: unknownPlace };
|
||||||
if (kind === 'write' && !('error' in prepared)) {
|
if (kind === 'write' && !('error' in prepared)) {
|
||||||
const { args } = prepared;
|
const refused = await deps.refusalOf?.(call.name, prepared.args);
|
||||||
const duplicate = held.some((change) => change.toolName === call.name && isDeepStrictEqual(change.args, args));
|
|
||||||
const refused = duplicate ? CHANGE_ALREADY_PROPOSED : await deps.refusalOf?.(call.name, args);
|
|
||||||
if (refused) prepared = { error: refused };
|
if (refused) prepared = { error: refused };
|
||||||
}
|
}
|
||||||
if (kind === 'read' && !('error' in prepared)) reads += 1;
|
if (kind === 'read' && !('error' in prepared)) reads += 1;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export interface CreateAccommodation {
|
|||||||
end_day_id?: number;
|
end_day_id?: number;
|
||||||
check_in?: string;
|
check_in?: string;
|
||||||
check_out?: string;
|
check_out?: string;
|
||||||
confirmation?: string | null;
|
confirmation?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CreateReservationData extends ReservationOrigin {
|
export interface CreateReservationData extends ReservationOrigin {
|
||||||
@@ -58,7 +58,7 @@ export interface UpdateReservationData {
|
|||||||
reservation_time?: string;
|
reservation_time?: string;
|
||||||
reservation_end_time?: string;
|
reservation_end_time?: string;
|
||||||
location?: string;
|
location?: string;
|
||||||
confirmation_number?: string | null;
|
confirmation_number?: string;
|
||||||
notes?: string;
|
notes?: string;
|
||||||
url?: string;
|
url?: string;
|
||||||
day_id?: number | null;
|
day_id?: number | null;
|
||||||
|
|||||||
@@ -438,7 +438,7 @@ export class ReservationsMcp {
|
|||||||
reservation_end_time: z.string().optional().describe('When it ends. Ignored for hotels, whose span is the check-in/check-out days.'),
|
reservation_end_time: z.string().optional().describe('When it ends. Ignored for hotels, whose span is the check-in/check-out days.'),
|
||||||
url: urlField,
|
url: urlField,
|
||||||
location: z.string().max(500).optional(),
|
location: z.string().max(500).optional(),
|
||||||
confirmation_number: z.string().max(100).nullable().optional().describe('Booking reference, or null to clear it'),
|
confirmation_number: z.string().max(100).optional(),
|
||||||
notes: z.string().max(1000).optional(),
|
notes: z.string().max(1000).optional(),
|
||||||
status: z.enum(RESERVATION_STATUSES).optional().describe('Reservation status: "pending", "confirmed", or "cancelled"'),
|
status: z.enum(RESERVATION_STATUSES).optional().describe('Reservation status: "pending", "confirmed", or "cancelled"'),
|
||||||
place_id: idSchema.nullable().optional().describe('Link to a place (use for hotel type), or null to unlink'),
|
place_id: idSchema.nullable().optional().describe('Link to a place (use for hotel type), or null to unlink'),
|
||||||
@@ -451,7 +451,7 @@ export class ReservationsMcp {
|
|||||||
{ tripId, reservationId, title, type, reservation_time, reservation_end_time, url, location, confirmation_number, notes, status, place_id, assignment_id }: {
|
{ tripId, reservationId, title, type, reservation_time, reservation_end_time, url, location, confirmation_number, notes, status, place_id, assignment_id }: {
|
||||||
tripId: number; reservationId: number; title?: string;
|
tripId: number; reservationId: number; title?: string;
|
||||||
type?: BookingType;
|
type?: BookingType;
|
||||||
reservation_time?: string; reservation_end_time?: string; url?: string; location?: string; confirmation_number?: string | null; notes?: string;
|
reservation_time?: string; reservation_end_time?: string; url?: string; location?: string; confirmation_number?: string; notes?: string;
|
||||||
status?: ReservationStatus; place_id?: number | null; assignment_id?: number | null;
|
status?: ReservationStatus; place_id?: number | null; assignment_id?: number | null;
|
||||||
},
|
},
|
||||||
ctx: McpContext,
|
ctx: McpContext,
|
||||||
|
|||||||
@@ -824,14 +824,10 @@ export class ReservationsService {
|
|||||||
if (!accExists) resolvedAccId = null;
|
if (!accExists) resolvedAccId = null;
|
||||||
}
|
}
|
||||||
const hadStay = Boolean(resolvedAccId);
|
const hadStay = Boolean(resolvedAccId);
|
||||||
const referenceOrNull = (value: string | null | undefined) =>
|
|
||||||
typeof value === 'string' && !value.trim() ? null : value;
|
|
||||||
let bookingConfirmation = referenceOrNull(confirmation_number);
|
|
||||||
if (type === 'hotel' && create_accommodation) {
|
if (type === 'hotel' && create_accommodation) {
|
||||||
const { place_id: accPlaceId, start_day_id, end_day_id, check_in, check_out, confirmation: accConf } = create_accommodation;
|
const { place_id: accPlaceId, start_day_id, end_day_id, check_in, check_out, confirmation: accConf } = create_accommodation;
|
||||||
if (start_day_id && end_day_id) {
|
if (start_day_id && end_day_id) {
|
||||||
await this.requireResolvableStay(create_accommodation);
|
await this.requireResolvableStay(create_accommodation);
|
||||||
const stayConfirmation = bookingConfirmation === undefined ? referenceOrNull(accConf) : bookingConfirmation;
|
|
||||||
if (resolvedAccId) {
|
if (resolvedAccId) {
|
||||||
const resolvedAccIdNum = accIdForRead(resolvedAccId)!;
|
const resolvedAccIdNum = accIdForRead(resolvedAccId)!;
|
||||||
const priorCheckIn = await this.dayAccommodationsRepo.getCheckIn(resolvedAccIdNum);
|
const priorCheckIn = await this.dayAccommodationsRepo.getCheckIn(resolvedAccIdNum);
|
||||||
@@ -841,9 +837,11 @@ export class ReservationsService {
|
|||||||
end_day_id,
|
end_day_id,
|
||||||
check_in: check_in || null,
|
check_in: check_in || null,
|
||||||
check_out: check_out || null,
|
check_out: check_out || null,
|
||||||
confirmation: stayConfirmation,
|
confirmation: accConf || confirmation_number || null,
|
||||||
});
|
});
|
||||||
// Carry the booking's day stop to the stay's new dates and place.
|
// The stay just moved. Its stop moves with it, or it is left sitting on a
|
||||||
|
// day nobody sleeps there any more, hidden from the day list because it
|
||||||
|
// still carries this booking's id and stranded in the middle of the drive.
|
||||||
stayMirror = await this.accommodations.moveStayStop(resolvedAccIdNum, accPlaceId || null, start_day_id, check_in, {
|
stayMirror = await this.accommodations.moveStayStop(resolvedAccIdNum, accPlaceId || null, start_day_id, check_in, {
|
||||||
checkInChanged: (check_in || null) !== (priorCheckIn ?? null),
|
checkInChanged: (check_in || null) !== (priorCheckIn ?? null),
|
||||||
});
|
});
|
||||||
@@ -855,11 +853,10 @@ export class ReservationsService {
|
|||||||
end_day_id,
|
end_day_id,
|
||||||
check_in: check_in || null,
|
check_in: check_in || null,
|
||||||
check_out: check_out || null,
|
check_out: check_out || null,
|
||||||
confirmation: stayConfirmation === undefined ? current.confirmation_number ?? null : stayConfirmation,
|
confirmation: accConf || confirmation_number || null,
|
||||||
});
|
});
|
||||||
stayMirror = await this.accommodations.attachStayStop(resolvedAccId, accPlaceId, start_day_id, check_in);
|
stayMirror = await this.accommodations.attachStayStop(resolvedAccId, accPlaceId, start_day_id, check_in);
|
||||||
}
|
}
|
||||||
if (resolvedAccId) bookingConfirmation = stayConfirmation;
|
|
||||||
accommodationChanged = true;
|
accommodationChanged = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -903,14 +900,21 @@ export class ReservationsService {
|
|||||||
const nextPlaceId = await this.resolvedOrNull('places', place_id !== undefined ? (place_id || null) : (current.place_id ?? null));
|
const nextPlaceId = await this.resolvedOrNull('places', place_id !== undefined ? (place_id || null) : (current.place_id ?? null));
|
||||||
const nextAssignmentId = await this.resolvedOrNull('day_assignments', assignment_id !== undefined ? (assignment_id || null) : (current.assignment_id ?? null));
|
const nextAssignmentId = await this.resolvedOrNull('day_assignments', assignment_id !== undefined ? (assignment_id || null) : (current.assignment_id ?? null));
|
||||||
|
|
||||||
// Resolve the update against the current row before writing.
|
// RS41. The `PlacesRepository.updatePlace`/PL11 precedent: the four
|
||||||
|
// legacy `COALESCE(?, col)` keep-if-null columns (`title`/`status`/
|
||||||
|
// `type`/`needs_review`) are resolved to their FINAL value here, in JS,
|
||||||
|
// against the `current` pre-image this method already holds — nothing
|
||||||
|
// else in this same transaction touches those four columns between the
|
||||||
|
// read and this write, so `current`'s snapshot is exactly what the
|
||||||
|
// legacy statement's own SQL-side `COALESCE` against the live row would
|
||||||
|
// have read.
|
||||||
const idNum = this.rowIdNum(id);
|
const idNum = this.rowIdNum(id);
|
||||||
await this.reservationsRepo.updateReservation(idNum, {
|
await this.reservationsRepo.updateReservation(idNum, {
|
||||||
title: title || current.title,
|
title: title || current.title,
|
||||||
reservation_time: nextReservationTime,
|
reservation_time: nextReservationTime,
|
||||||
reservation_end_time: nextReservationEndTime,
|
reservation_end_time: nextReservationEndTime,
|
||||||
location: location !== undefined ? (location || null) : (current.location ?? null),
|
location: location !== undefined ? (location || null) : (current.location ?? null),
|
||||||
confirmation_number: bookingConfirmation !== undefined ? (bookingConfirmation || null) : (current.confirmation_number ?? null),
|
confirmation_number: confirmation_number !== undefined ? (confirmation_number || null) : (current.confirmation_number ?? null),
|
||||||
notes: notes !== undefined ? (notes || null) : (current.notes ?? null),
|
notes: notes !== undefined ? (notes || null) : (current.notes ?? null),
|
||||||
url: url !== undefined ? (url || null) : ((current as Reservation & { url?: string | null }).url ?? null),
|
url: url !== undefined ? (url || null) : ((current as Reservation & { url?: string | null }).url ?? null),
|
||||||
day_id: nextDayId,
|
day_id: nextDayId,
|
||||||
@@ -928,19 +932,19 @@ export class ReservationsService {
|
|||||||
await this.saveEndpoints(idNum, endpoints);
|
await this.saveEndpoints(idNum, endpoints);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sync times and explicit confirmation edits to the linked stay.
|
// Sync check-in/out to accommodation if linked
|
||||||
const resolvedMeta = nextMetadata !== undefined ? nextMetadata : (current.metadata ? decodeJson(RESERVATION_METADATA, current.metadata, `reservation ${idNum}`) : null);
|
const resolvedMeta = nextMetadata !== undefined ? nextMetadata : (current.metadata ? decodeJson(RESERVATION_METADATA, current.metadata, `reservation ${idNum}`) : null);
|
||||||
if (resolvedAccId) {
|
if (resolvedAccId && resolvedMeta) {
|
||||||
const meta = resolvedMeta ? decodeJson(RESERVATION_METADATA, resolvedMeta) as AccommodationTimesMeta : null;
|
const meta = decodeJson(RESERVATION_METADATA, resolvedMeta) as AccommodationTimesMeta;
|
||||||
const resolvedAccIdNum = accIdForRead(resolvedAccId)!;
|
const resolvedAccIdNum = accIdForRead(resolvedAccId)!;
|
||||||
if (meta?.check_in_time || meta?.check_in_end_time || meta?.check_out_time) {
|
if (meta.check_in_time || meta.check_in_end_time || meta.check_out_time) {
|
||||||
await this.dayAccommodationsRepo.patchTimes(
|
await this.dayAccommodationsRepo.patchTimes(
|
||||||
resolvedAccIdNum, meta.check_in_time || null, meta.check_in_end_time || null, meta.check_out_time || null,
|
resolvedAccIdNum, meta.check_in_time || null, meta.check_in_end_time || null, meta.check_out_time || null,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (!accommodationChanged && bookingConfirmation !== undefined) {
|
const resolvedConf = confirmation_number !== undefined ? confirmation_number : current.confirmation_number;
|
||||||
await this.dayAccommodationsRepo.patchConfirmation(resolvedAccIdNum, bookingConfirmation);
|
if (resolvedConf) {
|
||||||
accommodationChanged = true;
|
await this.dayAccommodationsRepo.patchConfirmation(resolvedAccIdNum, resolvedConf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,213 +0,0 @@
|
|||||||
import { buildApp } from '../../src/bootstrap';
|
|
||||||
import { Reservations } from '../../src/db/entities/Reservations.entity';
|
|
||||||
import { AccommodationsService } from '../../src/nest/accommodations/accommodations.service';
|
|
||||||
import { legacyBoundIntegerText } from '../../src/nest/common/row-id';
|
|
||||||
import { withRequestContext } from '../../src/nest/database/request-context';
|
|
||||||
import { ReservationsService } from '../../src/nest/reservations/reservations.service';
|
|
||||||
import { makePlace } from '../helpers/factories/places';
|
|
||||||
import { makeReservation } from '../helpers/factories/reservations';
|
|
||||||
import { findRow, findRows, updateRows } from '../helpers/factories/rows';
|
|
||||||
import { makeDay, makeTrip } from '../helpers/factories/trips';
|
|
||||||
import { makeUser } from '../helpers/factories/users';
|
|
||||||
import { MikroORM } from '@mikro-orm/core';
|
|
||||||
import type { INestApplication } from '@nestjs/common';
|
|
||||||
|
|
||||||
import { afterAll, beforeAll, describe, expect, it } from 'vitest';
|
|
||||||
|
|
||||||
let app: INestApplication;
|
|
||||||
let orm: MikroORM;
|
|
||||||
let svc: AccommodationsService;
|
|
||||||
|
|
||||||
beforeAll(async () => {
|
|
||||||
app = await buildApp();
|
|
||||||
orm = app.get(MikroORM);
|
|
||||||
svc = app.get(AccommodationsService);
|
|
||||||
}, 60_000);
|
|
||||||
|
|
||||||
afterAll(async () => {
|
|
||||||
await app?.close();
|
|
||||||
});
|
|
||||||
|
|
||||||
function linkedReservation(accommodationId: number) {
|
|
||||||
return findRow(orm, Reservations, { accommodation_id: legacyBoundIntegerText(accommodationId) });
|
|
||||||
}
|
|
||||||
|
|
||||||
function editStay(id: number, tripId: number, fields: Parameters<AccommodationsService['updateAccommodation']>[2]) {
|
|
||||||
return withRequestContext(orm, async () => {
|
|
||||||
const existing = await svc.getAccommodation(id, tripId);
|
|
||||||
if (!existing) throw new Error('Stay was not found');
|
|
||||||
return svc.updateAccommodation(id, existing, fields);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
describe('Accommodation confirmation references', () => {
|
|
||||||
async function stayForConfirmation(confirmation?: string) {
|
|
||||||
const { user } = await makeUser(orm);
|
|
||||||
const trip = await makeTrip(orm, user.id);
|
|
||||||
const day = await makeDay(orm, trip.id);
|
|
||||||
const place = await makePlace(orm, trip.id);
|
|
||||||
const { accommodation } = await withRequestContext(orm, () =>
|
|
||||||
svc.createAccommodation(trip.id, {
|
|
||||||
place_id: place.id,
|
|
||||||
start_day_id: day.id,
|
|
||||||
end_day_id: day.id,
|
|
||||||
confirmation,
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
if (!accommodation) throw new Error('Stay was not created');
|
|
||||||
return { accommodation, trip, day, place };
|
|
||||||
}
|
|
||||||
|
|
||||||
it.each(['Waiting for the hotel', 'tBd', 'N/a', 'NOT-BOOKED-YET'])(
|
|
||||||
'ACC-3301: creates a pending booking with placeholder %s',
|
|
||||||
async (confirmation) => {
|
|
||||||
const { accommodation } = await stayForConfirmation(confirmation);
|
|
||||||
|
|
||||||
expect(accommodation.confirmation).toBe(confirmation);
|
|
||||||
expect(await linkedReservation(accommodation.id)).toMatchObject({
|
|
||||||
confirmation_number: confirmation,
|
|
||||||
status: 'pending',
|
|
||||||
});
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
it.each([
|
|
||||||
['NOT BOOKED YET: pick a hotel', 'ABC-12345'],
|
|
||||||
['not_booked_yet', '1234 567 890'],
|
|
||||||
['T.B.D', 'XYZ'],
|
|
||||||
])('ACC-3301: confirms a booking after placeholder %s is replaced with %s', async (confirmation, reference) => {
|
|
||||||
const { accommodation, trip } = await stayForConfirmation();
|
|
||||||
const { accommodation: updated } = await editStay(accommodation.id, trip.id, { confirmation });
|
|
||||||
|
|
||||||
expect(updated?.confirmation).toBe(confirmation);
|
|
||||||
expect(await linkedReservation(accommodation.id)).toMatchObject({
|
|
||||||
confirmation_number: confirmation,
|
|
||||||
status: 'pending',
|
|
||||||
});
|
|
||||||
await editStay(accommodation.id, trip.id, { confirmation: ` ${reference} ` });
|
|
||||||
expect(await linkedReservation(accommodation.id)).toMatchObject({
|
|
||||||
confirmation_number: reference,
|
|
||||||
status: 'confirmed',
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it.each([null, '', ' \t '])(
|
|
||||||
'ACC-3301: clearing with %j clears each booking reference and reopens its confirmation',
|
|
||||||
async (confirmation) => {
|
|
||||||
const { accommodation, trip } = await stayForConfirmation('ABC123');
|
|
||||||
const accommodation_id = legacyBoundIntegerText(accommodation.id);
|
|
||||||
await makeReservation(orm, trip.id, {
|
|
||||||
accommodation_id,
|
|
||||||
type: 'hotel',
|
|
||||||
status: 'cancelled',
|
|
||||||
confirmation_number: 'ABC123',
|
|
||||||
});
|
|
||||||
await makeReservation(orm, trip.id, { accommodation_id, type: 'hotel', status: 'confirmed' });
|
|
||||||
const { accommodation: updated } = await editStay(accommodation.id, trip.id, { confirmation });
|
|
||||||
|
|
||||||
expect(updated?.confirmation).toBeNull();
|
|
||||||
expect(await findRows(orm, Reservations, { accommodation_id }, { id: 'asc' })).toMatchObject([
|
|
||||||
{ confirmation_number: null, status: 'pending' },
|
|
||||||
{ confirmation_number: null, status: 'cancelled' },
|
|
||||||
{ confirmation_number: null, status: 'confirmed' },
|
|
||||||
]);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
it('ACC-3301: omitting the code preserves the linked booking reference and its chosen status', async () => {
|
|
||||||
const { accommodation, trip } = await stayForConfirmation('STAY-1');
|
|
||||||
await updateRows(
|
|
||||||
orm,
|
|
||||||
Reservations,
|
|
||||||
{ accommodation_id: legacyBoundIntegerText(accommodation.id) },
|
|
||||||
{
|
|
||||||
confirmation_number: 'BOOKING-1',
|
|
||||||
status: 'pending',
|
|
||||||
},
|
|
||||||
);
|
|
||||||
const { accommodation: updated } = await editStay(accommodation.id, trip.id, {
|
|
||||||
notes: 'Late arrival',
|
|
||||||
});
|
|
||||||
|
|
||||||
expect(updated?.confirmation).toBe('STAY-1');
|
|
||||||
expect(await linkedReservation(accommodation.id)).toMatchObject({
|
|
||||||
confirmation_number: 'BOOKING-1',
|
|
||||||
status: 'pending',
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('ACC-3301: resubmitting the same stay reference reconciles the booking while preserving its pending status', async () => {
|
|
||||||
const { accommodation, trip } = await stayForConfirmation('STAY-1');
|
|
||||||
await updateRows(
|
|
||||||
orm,
|
|
||||||
Reservations,
|
|
||||||
{ accommodation_id: legacyBoundIntegerText(accommodation.id) },
|
|
||||||
{
|
|
||||||
confirmation_number: 'BOOKING-1',
|
|
||||||
status: 'pending',
|
|
||||||
},
|
|
||||||
);
|
|
||||||
await editStay(accommodation.id, trip.id, { confirmation: 'STAY-1', notes: 'Late arrival' });
|
|
||||||
|
|
||||||
expect(await linkedReservation(accommodation.id)).toMatchObject({
|
|
||||||
confirmation_number: 'STAY-1',
|
|
||||||
status: 'pending',
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('ACC-3301: explicitly clearing an empty stay clears a stale booking reference', async () => {
|
|
||||||
const { accommodation, trip } = await stayForConfirmation();
|
|
||||||
await updateRows(
|
|
||||||
orm,
|
|
||||||
Reservations,
|
|
||||||
{ accommodation_id: legacyBoundIntegerText(accommodation.id) },
|
|
||||||
{
|
|
||||||
confirmation_number: 'STALE',
|
|
||||||
status: 'confirmed',
|
|
||||||
},
|
|
||||||
);
|
|
||||||
await editStay(accommodation.id, trip.id, { confirmation: null });
|
|
||||||
|
|
||||||
expect(await linkedReservation(accommodation.id)).toMatchObject({ confirmation_number: null, status: 'pending' });
|
|
||||||
});
|
|
||||||
|
|
||||||
it.each([
|
|
||||||
{ nested: null, expected: null },
|
|
||||||
{ nested: ' \t ', expected: null },
|
|
||||||
{ nested: 'NEW-REF', expected: 'NEW-REF' },
|
|
||||||
{ top: null, nested: 'OLD-REF', expected: null },
|
|
||||||
{ top: 'TOP-REF', nested: null, expected: 'TOP-REF' },
|
|
||||||
])(
|
|
||||||
'ACC-3301: syncs the selected reference across a complete booking update (%j)',
|
|
||||||
async ({ top, nested, expected }) => {
|
|
||||||
const { accommodation, trip, day, place } = await stayForConfirmation('OLD-REF');
|
|
||||||
const booking = await linkedReservation(accommodation.id);
|
|
||||||
if (!booking) throw new Error('Booking was not found');
|
|
||||||
const bookings = app.get(ReservationsService);
|
|
||||||
|
|
||||||
await withRequestContext(orm, async () => {
|
|
||||||
const current = await bookings.getReservation(booking.id, trip.id);
|
|
||||||
if (!current) throw new Error('Booking was not found');
|
|
||||||
const { reservation, accommodationChanged } = await bookings.update(
|
|
||||||
booking.id,
|
|
||||||
trip.id,
|
|
||||||
{
|
|
||||||
type: 'hotel',
|
|
||||||
status: 'confirmed',
|
|
||||||
confirmation_number: top,
|
|
||||||
create_accommodation: {
|
|
||||||
place_id: place.id,
|
|
||||||
start_day_id: day.id,
|
|
||||||
end_day_id: day.id,
|
|
||||||
confirmation: nested,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
current,
|
|
||||||
);
|
|
||||||
expect(accommodationChanged).toBe(true);
|
|
||||||
expect(reservation).toMatchObject({ confirmation_number: expected, status: 'confirmed' });
|
|
||||||
expect(await svc.getAccommodation(accommodation.id, trip.id)).toMatchObject({ confirmation: expected });
|
|
||||||
});
|
|
||||||
},
|
|
||||||
);
|
|
||||||
});
|
|
||||||
@@ -294,11 +294,11 @@ export const bookings: CaseGroup = {
|
|||||||
{
|
{
|
||||||
tool: 'update_accommodation',
|
tool: 'update_accommodation',
|
||||||
needs: ['stay'],
|
needs: ['stay'],
|
||||||
args: (s) => ({ tripId: s.trip.id, accommodationId: s.stay.id, confirmation: null }),
|
args: (s) => ({ tripId: s.trip.id, accommodationId: s.stay.id, notes: 'Late arrival' }),
|
||||||
rest: {
|
rest: {
|
||||||
method: 'put',
|
method: 'put',
|
||||||
path: (s) => `/api/trips/${s.trip.id}/accommodations/${s.stay.id}`,
|
path: (s) => `/api/trips/${s.trip.id}/accommodations/${s.stay.id}`,
|
||||||
body: () => ({ confirmation: null }),
|
body: () => ({ notes: 'Late arrival' }),
|
||||||
},
|
},
|
||||||
expect: ['accommodation:updated'],
|
expect: ['accommodation:updated'],
|
||||||
},
|
},
|
||||||
@@ -352,19 +352,14 @@ export const bookings: CaseGroup = {
|
|||||||
{
|
{
|
||||||
tool: 'update_reservation',
|
tool: 'update_reservation',
|
||||||
needs: ['stay', 'member'],
|
needs: ['stay', 'member'],
|
||||||
args: (s) => ({
|
args: (s) => ({ tripId: s.trip.id, reservationId: s.stay.reservationId, status: 'confirmed' }),
|
||||||
tripId: s.trip.id,
|
|
||||||
reservationId: s.stay.reservationId,
|
|
||||||
status: 'confirmed',
|
|
||||||
confirmation_number: null,
|
|
||||||
}),
|
|
||||||
rest: {
|
rest: {
|
||||||
method: 'put',
|
method: 'put',
|
||||||
path: (s) => `/api/trips/${s.trip.id}/reservations/${s.stay.reservationId}`,
|
path: (s) => `/api/trips/${s.trip.id}/reservations/${s.stay.reservationId}`,
|
||||||
body: () => ({ status: 'confirmed', confirmation_number: null }),
|
body: () => ({ status: 'confirmed' }),
|
||||||
},
|
},
|
||||||
settle: true,
|
settle: true,
|
||||||
expect: ['accommodation:updated', 'reservation:updated', BOOKING_NOTICE],
|
expect: ['reservation:updated', BOOKING_NOTICE],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// A hotel booking takes its stay (and the stay's stop) and its linked cost along.
|
// A hotel booking takes its stay (and the stay's stop) and its linked cost along.
|
||||||
|
|||||||
@@ -65,7 +65,6 @@ const KINDS: Record<string, AssistantToolKind> = {
|
|||||||
get_weather: 'read',
|
get_weather: 'read',
|
||||||
get_place_details: 'read',
|
get_place_details: 'read',
|
||||||
create_place: 'write',
|
create_place: 'write',
|
||||||
create_packing_item: 'write',
|
|
||||||
open_trip_chat: 'read',
|
open_trip_chat: 'read',
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -285,40 +284,6 @@ describe('runAgentLoop', () => {
|
|||||||
expect(t.chunks.at(-1)).toEqual({ type: 'finish', finishReason: 'tool-calls' });
|
expect(t.chunks.at(-1)).toEqual({ type: 'finish', finishReason: 'tool-calls' });
|
||||||
});
|
});
|
||||||
|
|
||||||
it('holds one proposal when the model repeats the same packing item change in a step', async () => {
|
|
||||||
const t = setup([
|
|
||||||
[
|
|
||||||
{
|
|
||||||
type: 'tool-call',
|
|
||||||
call: { id: 'first', name: 'create_packing_item', args: { name: 'Adapter', quantity: 2 } },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'tool-call',
|
|
||||||
call: { id: 'repeat', name: 'create_packing_item', args: { quantity: 2, name: 'Adapter' } },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'tool-call',
|
|
||||||
call: { id: 'other', name: 'create_packing_item', args: { name: 'Adapter', quantity: 3 } },
|
|
||||||
},
|
|
||||||
],
|
|
||||||
]);
|
|
||||||
|
|
||||||
const outcome = await runAgentLoop(t.deps, t.input, t.writer, new AbortController().signal);
|
|
||||||
|
|
||||||
expect(outcome.end).toBe('awaiting');
|
|
||||||
expect(t.memory.held[0].held.map((call) => call.providerCallId)).toEqual(['first', 'other']);
|
|
||||||
expect(t.chunks.filter((chunk) => chunk.type === 'tool-approval-request')).toHaveLength(2);
|
|
||||||
expect(t.memory.held[0].step.parts).toContainEqual({
|
|
||||||
type: 'tool-call',
|
|
||||||
toolCallId: 'repeat',
|
|
||||||
toolName: 'create_packing_item',
|
|
||||||
args: { quantity: 2, name: 'Adapter' },
|
|
||||||
result: 'This exact change is already waiting for approval.',
|
|
||||||
isError: true,
|
|
||||||
});
|
|
||||||
expect(t.tools.call).not.toHaveBeenCalled();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('ASTAGT-004: more changes than a step may hold go back to the model as an error', async () => {
|
it('ASTAGT-004: more changes than a step may hold go back to the model as an error', async () => {
|
||||||
const calls = Array.from({ length: MAX_WRITES_PER_STEP + 1 }, (_, i): AiChatEvent => ({
|
const calls = Array.from({ length: MAX_WRITES_PER_STEP + 1 }, (_, i): AiChatEvent => ({
|
||||||
type: 'tool-call',
|
type: 'tool-call',
|
||||||
|
|||||||
@@ -1174,7 +1174,6 @@ describe('ReservationsService — legacy branch parity (coverage of the folded c
|
|||||||
const place = createPlace(testDb, trip.id);
|
const place = createPlace(testDb, trip.id);
|
||||||
const days = await findRows(orm, Days, { trip: trip.id }, { day_number: 'asc' }) as { id: number }[];
|
const days = await findRows(orm, Days, { trip: trip.id }, { day_number: 'asc' }) as { id: number }[];
|
||||||
const res = createReservation(testDb, trip.id, { title: 'Hotel', type: 'hotel' });
|
const res = createReservation(testDb, trip.id, { title: 'Hotel', type: 'hotel' });
|
||||||
await updateRows(orm, Reservations, { id: res.id }, { confirmation_number: 'BOOKING-1' });
|
|
||||||
const current = (await svc.getReservation(String(res.id), String(trip.id)))!;
|
const current = (await svc.getReservation(String(res.id), String(trip.id)))!;
|
||||||
const { reservation, accommodationChanged } = await svc.update(String(res.id), String(trip.id), {
|
const { reservation, accommodationChanged } = await svc.update(String(res.id), String(trip.id), {
|
||||||
type: 'hotel',
|
type: 'hotel',
|
||||||
@@ -1182,7 +1181,7 @@ describe('ReservationsService — legacy branch parity (coverage of the folded c
|
|||||||
}, current);
|
}, current);
|
||||||
expect(accommodationChanged).toBe(true);
|
expect(accommodationChanged).toBe(true);
|
||||||
expect(reservation.accommodation_id).not.toBeNull();
|
expect(reservation.accommodation_id).not.toBeNull();
|
||||||
expect(await findRows(orm, DayAccommodations, { trip: trip.id })).toMatchObject([{ confirmation: 'BOOKING-1' }]);
|
expect(({ c: await countRows(orm, DayAccommodations, { trip: trip.id }) })).toEqual({ c: 1 });
|
||||||
});
|
});
|
||||||
|
|
||||||
it('RESV-SVC-023: explicit update fields bind their values; empty strings null; absent fields keep current', async () => {
|
it('RESV-SVC-023: explicit update fields bind their values; empty strings null; absent fields keep current', async () => {
|
||||||
@@ -1221,17 +1220,17 @@ describe('ReservationsService — legacy branch parity (coverage of the folded c
|
|||||||
expect(reservation.end_day_id).toBe(days[1].id);
|
expect(reservation.end_day_id).toBe(days[1].id);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('RESV-SVC-025: stored metadata drives the accommodation time sync while ACC-3301 preserves an omitted reference', async () => {
|
it('RESV-SVC-025: with metadata absent, the stored metadata JSON drives the accommodation sync (confirmation falls back to current)', async () => {
|
||||||
const { trip } = ownerTrip({ start_date: '2030-05-01', end_date: '2030-05-02' });
|
const { trip } = ownerTrip({ start_date: '2030-05-01', end_date: '2030-05-02' });
|
||||||
const place = createPlace(testDb, trip.id);
|
const place = createPlace(testDb, trip.id);
|
||||||
const days = await findRows(orm, Days, { trip: trip.id }, { day_number: 'asc' }) as { id: number }[];
|
const days = await findRows(orm, Days, { trip: trip.id }, { day_number: 'asc' }) as { id: number }[];
|
||||||
const acc = createDayAccommodation(testDb, trip.id, place.id, days[0].id, days[1].id, { confirmation: 'STAY-REF' });
|
const acc = createDayAccommodation(testDb, trip.id, place.id, days[0].id, days[1].id);
|
||||||
const res = createReservation(testDb, trip.id, { title: 'Hotel', type: 'hotel' });
|
const res = createReservation(testDb, trip.id, { title: 'Hotel', type: 'hotel' });
|
||||||
await updateRows(orm, Reservations, { id: res.id }, { accommodation_id: String(acc.id), metadata: JSON.stringify({ check_in_time: '16:00' }), confirmation_number: 'KEEP' });
|
await updateRows(orm, Reservations, { id: res.id }, { accommodation_id: String(acc.id), metadata: JSON.stringify({ check_in_time: '16:00' }), confirmation_number: 'KEEP' });
|
||||||
const current = (await svc.getReservation(String(res.id), String(trip.id)))!;
|
const current = (await svc.getReservation(String(res.id), String(trip.id)))!;
|
||||||
await svc.update(String(res.id), String(trip.id), { notes: 'touch' }, current);
|
await svc.update(String(res.id), String(trip.id), { notes: 'touch' }, current);
|
||||||
const row = await findRow(orm, DayAccommodations, { id: acc.id });
|
const row = await findRow(orm, DayAccommodations, { id: acc.id });
|
||||||
expect(row).toMatchObject({ check_in: '16:00', confirmation: 'STAY-REF' });
|
expect(row).toMatchObject({ check_in: '16:00', confirmation: 'KEEP' });
|
||||||
});
|
});
|
||||||
|
|
||||||
it('H1 (Plan 3h Task 7 review) — patchTimes: updating a linked reservation OVERRIDES the stay\'s existing non-null check-in/end/out — the new value wins, matching legacy COALESCE(?, col)', async () => {
|
it('H1 (Plan 3h Task 7 review) — patchTimes: updating a linked reservation OVERRIDES the stay\'s existing non-null check-in/end/out — the new value wins, matching legacy COALESCE(?, col)', async () => {
|
||||||
@@ -1255,56 +1254,22 @@ describe('ReservationsService — legacy branch parity (coverage of the folded c
|
|||||||
expect(row).toMatchObject({ check_in: '16:30', check_in_end: '11:15', check_out: '09:00' });
|
expect(row).toMatchObject({ check_in: '16:30', check_in_end: '11:15', check_out: '09:00' });
|
||||||
});
|
});
|
||||||
|
|
||||||
it('H1: explicitly updating a booking reference replaces the stay reference', async () => {
|
it('H1 (Plan 3h Task 7 review) — patchConfirmation: updating a linked reservation OVERRIDES the stay\'s existing non-null confirmation — the new value wins, matching legacy COALESCE(?, confirmation)', async () => {
|
||||||
const { trip } = ownerTrip({ start_date: '2030-05-01', end_date: '2030-05-02' });
|
const { trip } = ownerTrip({ start_date: '2030-05-01', end_date: '2030-05-02' });
|
||||||
const place = createPlace(testDb, trip.id);
|
const place = createPlace(testDb, trip.id);
|
||||||
const days = await findRows(orm, Days, { trip: trip.id }, { day_number: 'asc' }) as { id: number }[];
|
const days = await findRows(orm, Days, { trip: trip.id }, { day_number: 'asc' }) as { id: number }[];
|
||||||
|
// The stay already holds a DIFFERENT, non-null confirmation — if
|
||||||
|
// `coalesceParam`'s (existing-wins) direction were used instead of
|
||||||
|
// `coalesceOverride`'s (new-wins), the stay would keep it.
|
||||||
const acc = createDayAccommodation(testDb, trip.id, place.id, days[0].id, days[1].id, { confirmation: 'ACC-OLD' });
|
const acc = createDayAccommodation(testDb, trip.id, place.id, days[0].id, days[1].id, { confirmation: 'ACC-OLD' });
|
||||||
const res = createReservation(testDb, trip.id, { title: 'Hotel', type: 'hotel' });
|
const res = createReservation(testDb, trip.id, { title: 'Hotel', type: 'hotel' });
|
||||||
await updateRows(orm, Reservations, { id: res.id }, { accommodation_id: String(acc.id), metadata: JSON.stringify({}), confirmation_number: 'RES-NEW' });
|
await updateRows(orm, Reservations, { id: res.id }, { accommodation_id: String(acc.id), metadata: JSON.stringify({}), confirmation_number: 'RES-NEW' });
|
||||||
const current = (await svc.getReservation(String(res.id), String(trip.id)))!;
|
const current = (await svc.getReservation(String(res.id), String(trip.id)))!;
|
||||||
await svc.update(String(res.id), String(trip.id), { confirmation_number: 'RES-NEW' }, current);
|
await svc.update(String(res.id), String(trip.id), { notes: 'touch' }, current);
|
||||||
const row = await findRow(orm, DayAccommodations, { id: acc.id });
|
const row = await findRow(orm, DayAccommodations, { id: acc.id });
|
||||||
expect(row).toMatchObject({ confirmation: 'RES-NEW' });
|
expect(row).toMatchObject({ confirmation: 'RES-NEW' });
|
||||||
});
|
});
|
||||||
|
|
||||||
it('ACC-3301: clearing the booking reference clears the stay without overriding the chosen status', async () => {
|
|
||||||
const { trip } = ownerTrip({ start_date: '2030-05-01', end_date: '2030-05-02' });
|
|
||||||
const place = createPlace(testDb, trip.id);
|
|
||||||
const days = await findRows(orm, Days, { trip: trip.id }, { day_number: 'asc' }) as { id: number }[];
|
|
||||||
const acc = createDayAccommodation(testDb, trip.id, place.id, days[0].id, days[1].id, { confirmation: 'ABC123' });
|
|
||||||
const res = createReservation(testDb, trip.id, { title: 'Hotel', type: 'hotel' });
|
|
||||||
await updateRows(orm, Reservations, { id: res.id }, { accommodation_id: String(acc.id), confirmation_number: 'ABC123' });
|
|
||||||
const current = await svc.getReservation(String(res.id), String(trip.id));
|
|
||||||
if (!current) throw new Error('Booking was not found');
|
|
||||||
const { reservation, accommodationChanged } = await svc.update(String(res.id), String(trip.id), {
|
|
||||||
confirmation_number: null, status: 'confirmed',
|
|
||||||
}, current);
|
|
||||||
|
|
||||||
expect(reservation).toMatchObject({ confirmation_number: null, status: 'confirmed' });
|
|
||||||
expect(accommodationChanged).toBe(true);
|
|
||||||
expect(await findRow(orm, DayAccommodations, { id: acc.id })).toMatchObject({ confirmation: null });
|
|
||||||
});
|
|
||||||
|
|
||||||
it('ACC-3301: a booking edit with stay details and no reference preserves the existing stay reference', async () => {
|
|
||||||
const { trip } = ownerTrip({ start_date: '2030-05-01', end_date: '2030-05-02' });
|
|
||||||
const place = createPlace(testDb, trip.id);
|
|
||||||
const days = await findRows(orm, Days, { trip: trip.id }, { day_number: 'asc' }) as { id: number }[];
|
|
||||||
const acc = createDayAccommodation(testDb, trip.id, place.id, days[0].id, days[1].id, { confirmation: 'ABC123' });
|
|
||||||
const res = createReservation(testDb, trip.id, { title: 'Hotel', type: 'hotel' });
|
|
||||||
await updateRows(orm, Reservations, { id: res.id }, { accommodation_id: String(acc.id) });
|
|
||||||
const current = await svc.getReservation(String(res.id), String(trip.id));
|
|
||||||
if (!current) throw new Error('Booking was not found');
|
|
||||||
await svc.update(String(res.id), String(trip.id), {
|
|
||||||
type: 'hotel',
|
|
||||||
create_accommodation: { place_id: place.id, start_day_id: days[0].id, end_day_id: days[1].id, check_in: '14:00' },
|
|
||||||
}, current);
|
|
||||||
|
|
||||||
expect(await findRow(orm, DayAccommodations, { id: acc.id })).toMatchObject({
|
|
||||||
confirmation: 'ABC123', check_in: '14:00',
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('RESV-SVC-026: resync derives the end day too, keeping the stored one when the end time is out of range', async () => {
|
it('RESV-SVC-026: resync derives the end day too, keeping the stored one when the end time is out of range', async () => {
|
||||||
const { trip } = ownerTrip({ start_date: '2030-05-01', end_date: '2030-05-03' });
|
const { trip } = ownerTrip({ start_date: '2030-05-01', end_date: '2030-05-03' });
|
||||||
const days = await findRows(orm, Days, { trip: trip.id }, { day_number: 'asc' }) as { id: number }[];
|
const days = await findRows(orm, Days, { trip: trip.id }, { day_number: 'asc' }) as { id: number }[];
|
||||||
|
|||||||
@@ -551,21 +551,6 @@ describe('AccommodationsRpc', () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
it('ACC-3301: a plugin can explicitly clear the stay reference with null', async () => {
|
|
||||||
const f = build();
|
|
||||||
const res = await f
|
|
||||||
.host()
|
|
||||||
.dispatch(req('accommodations.update', { tripId: 1, accommodationId: 11, input: { confirmation: null } }), 42);
|
|
||||||
|
|
||||||
expect(res).toMatchObject({ k: 'res', result: { id: 11 } });
|
|
||||||
expect(f.days.updateAccommodation).toHaveBeenCalledWith(
|
|
||||||
11,
|
|
||||||
{ id: 11 },
|
|
||||||
expect.objectContaining({ confirmation: null }),
|
|
||||||
);
|
|
||||||
expect(events(f.realtime)).toEqual(['accommodation:updated']);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('BOOK-RPC-015d deleting a block without a partner cascades only its own event', async () => {
|
it('BOOK-RPC-015d deleting a block without a partner cascades only its own event', async () => {
|
||||||
const f = build();
|
const f = build();
|
||||||
await f.host().dispatch(req('accommodations.delete', { tripId: 1, accommodationId: 11 }), 42);
|
await f.host().dispatch(req('accommodations.delete', { tripId: 1, accommodationId: 11 }), 42);
|
||||||
|
|||||||
@@ -114,10 +114,6 @@ export const NOT_PLURAL = [
|
|||||||
{ key: 'dawarich.duration.hours', because: 'a duration in a unit symbol (h), the same for any number' },
|
{ key: 'dawarich.duration.hours', because: 'a duration in a unit symbol (h), the same for any number' },
|
||||||
{ key: 'dawarich.duration.hoursMinutes', because: 'a duration in unit symbols (h, min), the same for any number' },
|
{ key: 'dawarich.duration.hoursMinutes', because: 'a duration in unit symbols (h, min), the same for any number' },
|
||||||
{ key: 'files.uploadErrorSize', because: 'a size limit in a unit symbol (MB), the same for any number' },
|
{ key: 'files.uploadErrorSize', because: 'a size limit in a unit symbol (MB), the same for any number' },
|
||||||
{
|
|
||||||
key: 'native.plans.aiPerMonth',
|
|
||||||
because: 'a monthly document allowance before a unit ("25 / month"), always in the tens',
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
import type { TranslationStrings } from '../types';
|
import type { TranslationStrings } from '../types';
|
||||||
|
|
||||||
const native: TranslationStrings = {
|
const native: TranslationStrings = {
|
||||||
|
'native.trial.cancelApple': 'لتجنب الدفع، ألغِ الاشتراك في App Store قبل نهاية الفترة التجريبية بـ٢٤ ساعة على الأقل.',
|
||||||
|
'native.trial.cancelPlay': 'لتجنب الدفع، ألغِ الاشتراك في Google Play قبل نهاية الفترة التجريبية.',
|
||||||
|
'native.trial.badge': '٧ أيام مجانًا',
|
||||||
|
'native.trial.price': '٧ أيام مجانًا، ثم {price} {period}.',
|
||||||
|
'native.trial.changed': 'تغيّر العرض. ارجع إلى الخطط وتحقّق من السعر الحالي.',
|
||||||
'native.connect.title': 'الاتصال بـ TREK',
|
'native.connect.title': 'الاتصال بـ TREK',
|
||||||
'native.connect.hint': 'أدخل العنوان الذي تفتح به TREK في متصفحك.',
|
'native.connect.hint': 'أدخل العنوان الذي تفتح به TREK في متصفحك.',
|
||||||
'native.connect.placeholder': 'https://trek.example.com',
|
'native.connect.placeholder': 'https://trek.example.com',
|
||||||
@@ -64,7 +69,6 @@ const native: TranslationStrings = {
|
|||||||
'native.plans.legalAndroid':
|
'native.plans.legalAndroid':
|
||||||
'يُخصم المبلغ من حساب Google الخاص بك عند التأكيد. يتجدد الاشتراك تلقائيًا ما لم تلغِه قبل نهاية الفترة. يمكنك إدارته أو إلغاؤه في Google Play من الملف الشخصي، الدفعات والاشتراكات، الاشتراكات.',
|
'يُخصم المبلغ من حساب Google الخاص بك عند التأكيد. يتجدد الاشتراك تلقائيًا ما لم تلغِه قبل نهاية الفترة. يمكنك إدارته أو إلغاؤه في Google Play من الملف الشخصي، الدفعات والاشتراكات، الاشتراكات.',
|
||||||
'native.plans.restoreNoneAndroid': 'لم يُعثر على اشتراك نشط في حساب Google هذا.',
|
'native.plans.restoreNoneAndroid': 'لم يُعثر على اشتراك نشط في حساب Google هذا.',
|
||||||
'native.plans.recommended': 'موصى به',
|
|
||||||
'native.claim.change': 'تغيير',
|
'native.claim.change': 'تغيير',
|
||||||
'native.claim.ruleLength': 'أحرف',
|
'native.claim.ruleLength': 'أحرف',
|
||||||
'native.claim.ruleUpper': 'حرف كبير',
|
'native.claim.ruleUpper': 'حرف كبير',
|
||||||
@@ -188,28 +192,17 @@ const native: TranslationStrings = {
|
|||||||
'native.welcome.photosTitle': 'الصور وكتاب الصور',
|
'native.welcome.photosTitle': 'الصور وكتاب الصور',
|
||||||
'native.welcome.photosSub': 'تبقى الذكريات مع الرحلة',
|
'native.welcome.photosSub': 'تبقى الذكريات مع الرحلة',
|
||||||
'native.welcome.discover': 'استكشف خطط السحابة',
|
'native.welcome.discover': 'استكشف خطط السحابة',
|
||||||
'native.trip.start.title': 'رحلة نهاية الأسبوع',
|
|
||||||
'native.trip.start.text': 'رحلات قصيرة، والتخطيط أولًا.',
|
|
||||||
'native.trip.basis.title': 'جولة',
|
|
||||||
'native.trip.basis.text': 'عدة محطات، والحجوزات تلقائيًا.',
|
|
||||||
'native.trip.plus.title': 'رحلة كبيرة',
|
|
||||||
'native.trip.plus.text': 'أسابيع في الطريق، مع المجموعة كلها.',
|
|
||||||
'native.trip.pro.title': 'رحّالة',
|
|
||||||
'native.trip.pro.text': 'لمن يسافر كثيرًا ولكتب الصور الكبيرة.',
|
|
||||||
'native.plans.unlimited': 'بلا حدود',
|
'native.plans.unlimited': 'بلا حدود',
|
||||||
'native.plans.unlimitedSub': 'الرحلات ورفاق السفر',
|
'native.plans.unlimitedSub': 'الرحلات ورفاق السفر',
|
||||||
'native.plans.inEveryPlan': 'في كل خطة',
|
|
||||||
'native.plans.yearlyIs': '{price} سنويًا، ألغِ في أي وقت',
|
'native.plans.yearlyIs': '{price} سنويًا، ألغِ في أي وقت',
|
||||||
'native.plans.monthlyIs': 'أي {price} شهريًا',
|
'native.plans.monthlyIs': 'أي {price} شهريًا',
|
||||||
'native.plans.storageFairUse': 'تخزين وفق الاستخدام العادل',
|
'native.plans.storage': 'التخزين',
|
||||||
'native.plans.aiPerMonth': '{n} / شهر',
|
'native.plans.notIncluded': 'غير مشمول',
|
||||||
'native.plans.aiNone': 'غير مشمول',
|
|
||||||
'native.plans.included': 'مشمول',
|
'native.plans.included': 'مشمول',
|
||||||
'native.plans.planned': 'مخطط له',
|
|
||||||
'native.plans.assistant': 'مساعد الذكاء الاصطناعي',
|
'native.plans.assistant': 'مساعد الذكاء الاصطناعي',
|
||||||
'native.plans.mailImport': 'استيراد البريد تلقائيًا',
|
'native.plans.mailImport': 'استيراد البريد تلقائيًا',
|
||||||
'native.plans.aiLabel': 'مستندات الذكاء الاصطناعي',
|
'native.plans.aiLabel': 'مستندات الذكاء الاصطناعي',
|
||||||
'native.plans.choose': 'اختر {trip}',
|
'native.plans.choose': 'اختر {plan}',
|
||||||
'native.plans.termsShort': 'شروط الاستخدام (EULA)',
|
'native.plans.termsShort': 'شروط الاستخدام (EULA)',
|
||||||
'native.plans.privacyShort': 'الخصوصية',
|
'native.plans.privacyShort': 'الخصوصية',
|
||||||
'native.plans.billing': 'الدفع',
|
'native.plans.billing': 'الدفع',
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
import type { TranslationStrings } from '../types';
|
import type { TranslationStrings } from '../types';
|
||||||
|
|
||||||
const native: TranslationStrings = {
|
const native: TranslationStrings = {
|
||||||
|
'native.trial.cancelApple':
|
||||||
|
'Ödəniş tutulmaması üçün sınaq bitməzdən ən azı 24 saat əvvəl App Store-da abunəliyi ləğv edin.',
|
||||||
|
'native.trial.cancelPlay': 'Ödəniş tutulmaması üçün sınaq bitməzdən əvvəl Google Play-də abunəliyi ləğv edin.',
|
||||||
|
'native.trial.badge': '7 gün pulsuz',
|
||||||
|
'native.trial.price': '7 gün pulsuz, sonra {period} {price}.',
|
||||||
|
'native.trial.changed': 'Təklif dəyişib. Tariflərə qayıdıb cari qiyməti yoxlayın.',
|
||||||
'native.connect.title': 'TREK-ə qoşulun',
|
'native.connect.title': 'TREK-ə qoşulun',
|
||||||
'native.connect.hint': 'TREK-i brauzerdə açdığınız ünvanı daxil edin.',
|
'native.connect.hint': 'TREK-i brauzerdə açdığınız ünvanı daxil edin.',
|
||||||
'native.connect.placeholder': 'https://trek.example.com',
|
'native.connect.placeholder': 'https://trek.example.com',
|
||||||
@@ -65,7 +71,6 @@ const native: TranslationStrings = {
|
|||||||
'native.plans.legalAndroid':
|
'native.plans.legalAndroid':
|
||||||
'Ödəniş təsdiq etdikdə Google hesabınızdan tutulur. Abunəlik dövr bitməzdən əvvəl ləğv etməsəniz avtomatik yenilənir. Onu Google Play-də Profil, Ödənişlər və abunəliklər, Abunəliklər bölməsində idarə edə və ya ləğv edə bilərsiniz.',
|
'Ödəniş təsdiq etdikdə Google hesabınızdan tutulur. Abunəlik dövr bitməzdən əvvəl ləğv etməsəniz avtomatik yenilənir. Onu Google Play-də Profil, Ödənişlər və abunəliklər, Abunəliklər bölməsində idarə edə və ya ləğv edə bilərsiniz.',
|
||||||
'native.plans.restoreNoneAndroid': 'Bu Google hesabında aktiv abunəlik tapılmadı.',
|
'native.plans.restoreNoneAndroid': 'Bu Google hesabında aktiv abunəlik tapılmadı.',
|
||||||
'native.plans.recommended': 'Tövsiyə olunur',
|
|
||||||
'native.claim.change': 'Dəyiş',
|
'native.claim.change': 'Dəyiş',
|
||||||
'native.claim.ruleLength': 'simvol',
|
'native.claim.ruleLength': 'simvol',
|
||||||
'native.claim.ruleUpper': 'Böyük hərf',
|
'native.claim.ruleUpper': 'Böyük hərf',
|
||||||
@@ -193,28 +198,17 @@ const native: TranslationStrings = {
|
|||||||
'native.welcome.photosTitle': 'Fotolar və foto kitab',
|
'native.welcome.photosTitle': 'Fotolar və foto kitab',
|
||||||
'native.welcome.photosSub': 'Xatirələr səyahətlə qalır',
|
'native.welcome.photosSub': 'Xatirələr səyahətlə qalır',
|
||||||
'native.welcome.discover': 'Bulud planlarına baxın',
|
'native.welcome.discover': 'Bulud planlarına baxın',
|
||||||
'native.trip.start.title': 'Həftəsonu səfəri',
|
|
||||||
'native.trip.start.text': 'Qısa səfərlər, əsasən planlaşdırma.',
|
|
||||||
'native.trip.basis.title': 'Tur',
|
|
||||||
'native.trip.basis.text': 'Bir neçə dayanacaq, rezervasiyalar avtomatik.',
|
|
||||||
'native.trip.plus.title': 'Böyük səyahət',
|
|
||||||
'native.trip.plus.text': 'Həftələrlə yolda, bütün qrupla.',
|
|
||||||
'native.trip.pro.title': 'Dünya səyyahı',
|
|
||||||
'native.trip.pro.text': 'Tez-tez səyahət edənlər və böyük foto kitablar üçün.',
|
|
||||||
'native.plans.unlimited': 'Limitsiz',
|
'native.plans.unlimited': 'Limitsiz',
|
||||||
'native.plans.unlimitedSub': 'Səfərlər və yol yoldaşları',
|
'native.plans.unlimitedSub': 'Səfərlər və yol yoldaşları',
|
||||||
'native.plans.inEveryPlan': 'hər planda',
|
|
||||||
'native.plans.yearlyIs': 'İllik {price}, istənilən vaxt ləğv edin',
|
'native.plans.yearlyIs': 'İllik {price}, istənilən vaxt ləğv edin',
|
||||||
'native.plans.monthlyIs': 'Bu, ayda {price} edir',
|
'native.plans.monthlyIs': 'Bu, ayda {price} edir',
|
||||||
'native.plans.storageFairUse': 'Ədalətli istifadə yaddaşı',
|
'native.plans.storage': 'Saxlama',
|
||||||
'native.plans.aiPerMonth': '{n} / ay',
|
'native.plans.notIncluded': 'Daxil deyil',
|
||||||
'native.plans.aiNone': 'Daxil deyil',
|
|
||||||
'native.plans.included': 'Daxildir',
|
'native.plans.included': 'Daxildir',
|
||||||
'native.plans.planned': 'Planlaşdırılır',
|
|
||||||
'native.plans.assistant': 'Sİ köməkçisi',
|
'native.plans.assistant': 'Sİ köməkçisi',
|
||||||
'native.plans.mailImport': 'Avtomatik e-poçt idxalı',
|
'native.plans.mailImport': 'Avtomatik e-poçt idxalı',
|
||||||
'native.plans.aiLabel': 'Sİ sənədləri',
|
'native.plans.aiLabel': 'Sİ sənədləri',
|
||||||
'native.plans.choose': '{trip} seçin',
|
'native.plans.choose': '{plan} seçin',
|
||||||
'native.plans.termsShort': 'İstifadə şərtləri (EULA)',
|
'native.plans.termsShort': 'İstifadə şərtləri (EULA)',
|
||||||
'native.plans.privacyShort': 'Məxfilik',
|
'native.plans.privacyShort': 'Məxfilik',
|
||||||
'native.plans.billing': 'Ödəniş',
|
'native.plans.billing': 'Ödəniş',
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
import type { TranslationStrings } from '../types';
|
import type { TranslationStrings } from '../types';
|
||||||
|
|
||||||
const native: TranslationStrings = {
|
const native: TranslationStrings = {
|
||||||
|
'native.trial.cancelApple': 'Para evitar cobranças, cancele no App Store pelo menos 24 horas antes do fim do teste.',
|
||||||
|
'native.trial.cancelPlay': 'Para evitar cobranças, cancele no Google Play antes do fim do teste.',
|
||||||
|
'native.trial.badge': '7 dias grátis',
|
||||||
|
'native.trial.price': '7 dias grátis, depois {price} {period}.',
|
||||||
|
'native.trial.changed': 'A oferta mudou. Volte aos planos e confira o preço atual.',
|
||||||
'native.connect.title': 'Conectar ao TREK',
|
'native.connect.title': 'Conectar ao TREK',
|
||||||
'native.connect.hint': 'Digite o endereço em que você abre o TREK no navegador.',
|
'native.connect.hint': 'Digite o endereço em que você abre o TREK no navegador.',
|
||||||
'native.connect.placeholder': 'https://trek.example.com',
|
'native.connect.placeholder': 'https://trek.example.com',
|
||||||
@@ -66,7 +71,6 @@ const native: TranslationStrings = {
|
|||||||
'native.plans.legalAndroid':
|
'native.plans.legalAndroid':
|
||||||
'O pagamento é cobrado na sua conta Google ao confirmar. A assinatura é renovada automaticamente, a menos que você a cancele antes do fim do período. Gerencie ou cancele no Google Play em Perfil, Pagamentos e assinaturas, Assinaturas.',
|
'O pagamento é cobrado na sua conta Google ao confirmar. A assinatura é renovada automaticamente, a menos que você a cancele antes do fim do período. Gerencie ou cancele no Google Play em Perfil, Pagamentos e assinaturas, Assinaturas.',
|
||||||
'native.plans.restoreNoneAndroid': 'Nenhuma assinatura ativa encontrada nesta conta Google.',
|
'native.plans.restoreNoneAndroid': 'Nenhuma assinatura ativa encontrada nesta conta Google.',
|
||||||
'native.plans.recommended': 'Recomendado',
|
|
||||||
'native.claim.change': 'Alterar',
|
'native.claim.change': 'Alterar',
|
||||||
'native.claim.ruleLength': 'caracteres',
|
'native.claim.ruleLength': 'caracteres',
|
||||||
'native.claim.ruleUpper': 'Maiúscula',
|
'native.claim.ruleUpper': 'Maiúscula',
|
||||||
@@ -195,28 +199,17 @@ const native: TranslationStrings = {
|
|||||||
'native.welcome.photosTitle': 'Fotos e fotolivro',
|
'native.welcome.photosTitle': 'Fotos e fotolivro',
|
||||||
'native.welcome.photosSub': 'As memórias ficam com a viagem',
|
'native.welcome.photosSub': 'As memórias ficam com a viagem',
|
||||||
'native.welcome.discover': 'Conhecer os planos na nuvem',
|
'native.welcome.discover': 'Conhecer os planos na nuvem',
|
||||||
'native.trip.start.title': 'Fim de semana',
|
|
||||||
'native.trip.start.text': 'Viagens curtas, mais planejamento.',
|
|
||||||
'native.trip.basis.title': 'Roteiro',
|
|
||||||
'native.trip.basis.text': 'Vários destinos, reservas automáticas.',
|
|
||||||
'native.trip.plus.title': 'Grande viagem',
|
|
||||||
'native.trip.plus.text': 'Semanas na estrada, com o grupo todo.',
|
|
||||||
'native.trip.pro.title': 'Viajante do mundo',
|
|
||||||
'native.trip.pro.text': 'Para quem viaja muito e faz fotolivros grandes.',
|
|
||||||
'native.plans.unlimited': 'Ilimitado',
|
'native.plans.unlimited': 'Ilimitado',
|
||||||
'native.plans.unlimitedSub': 'Viagens e companheiros de viagem',
|
'native.plans.unlimitedSub': 'Viagens e companheiros de viagem',
|
||||||
'native.plans.inEveryPlan': 'em todos os planos',
|
|
||||||
'native.plans.yearlyIs': '{price} por ano, cancele quando quiser',
|
'native.plans.yearlyIs': '{price} por ano, cancele quando quiser',
|
||||||
'native.plans.monthlyIs': 'São {price} por mês',
|
'native.plans.monthlyIs': 'São {price} por mês',
|
||||||
'native.plans.storageFairUse': 'Armazenamento de uso justo',
|
'native.plans.storage': 'Armazenamento',
|
||||||
'native.plans.aiPerMonth': '{n} / mês',
|
'native.plans.notIncluded': 'Não incluído',
|
||||||
'native.plans.aiNone': 'Não incluído',
|
|
||||||
'native.plans.included': 'Incluído',
|
'native.plans.included': 'Incluído',
|
||||||
'native.plans.planned': 'Planejado',
|
|
||||||
'native.plans.assistant': 'Assistente de IA',
|
'native.plans.assistant': 'Assistente de IA',
|
||||||
'native.plans.mailImport': 'Importação automática de e-mails',
|
'native.plans.mailImport': 'Importação automática de e-mails',
|
||||||
'native.plans.aiLabel': 'Documentos de IA',
|
'native.plans.aiLabel': 'Documentos de IA',
|
||||||
'native.plans.choose': 'Escolher {trip}',
|
'native.plans.choose': 'Escolher {plan}',
|
||||||
'native.plans.termsShort': 'Termos de uso (EULA)',
|
'native.plans.termsShort': 'Termos de uso (EULA)',
|
||||||
'native.plans.privacyShort': 'Privacidade',
|
'native.plans.privacyShort': 'Privacidade',
|
||||||
'native.plans.billing': 'Cobrança',
|
'native.plans.billing': 'Cobrança',
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
import type { TranslationStrings } from '../types';
|
import type { TranslationStrings } from '../types';
|
||||||
|
|
||||||
const native: TranslationStrings = {
|
const native: TranslationStrings = {
|
||||||
|
'native.trial.cancelApple':
|
||||||
|
'Per evitar el cobrament, cancel·la a l’App Store almenys 24 hores abans que acabi la prova.',
|
||||||
|
'native.trial.cancelPlay': 'Per evitar el cobrament, cancel·la a Google Play abans que acabi la prova.',
|
||||||
|
'native.trial.badge': '7 dies gratis',
|
||||||
|
'native.trial.price': '7 dies gratis, després {price} {period}.',
|
||||||
|
'native.trial.changed': 'L’oferta ha canviat. Torna als plans i comprova el preu actual.',
|
||||||
'native.connect.title': 'Connecta amb TREK',
|
'native.connect.title': 'Connecta amb TREK',
|
||||||
'native.connect.hint': 'Introdueix l’adreça amb què obres TREK al navegador.',
|
'native.connect.hint': 'Introdueix l’adreça amb què obres TREK al navegador.',
|
||||||
'native.connect.placeholder': 'https://trek.example.com',
|
'native.connect.placeholder': 'https://trek.example.com',
|
||||||
@@ -66,7 +72,6 @@ const native: TranslationStrings = {
|
|||||||
'native.plans.legalAndroid':
|
'native.plans.legalAndroid':
|
||||||
'El pagament es carrega al teu compte de Google en confirmar. La subscripció es renova automàticament si no la cancel·les abans que acabi el període. Gestiona-la o cancel·la-la a Google Play, a Perfil, Pagaments i subscripcions, Subscripcions.',
|
'El pagament es carrega al teu compte de Google en confirmar. La subscripció es renova automàticament si no la cancel·les abans que acabi el període. Gestiona-la o cancel·la-la a Google Play, a Perfil, Pagaments i subscripcions, Subscripcions.',
|
||||||
'native.plans.restoreNoneAndroid': 'No s’ha trobat cap subscripció activa en aquest compte de Google.',
|
'native.plans.restoreNoneAndroid': 'No s’ha trobat cap subscripció activa en aquest compte de Google.',
|
||||||
'native.plans.recommended': 'Recomanat',
|
|
||||||
'native.claim.change': 'Canvia',
|
'native.claim.change': 'Canvia',
|
||||||
'native.claim.ruleLength': 'caràcters',
|
'native.claim.ruleLength': 'caràcters',
|
||||||
'native.claim.ruleUpper': 'Majúscula',
|
'native.claim.ruleUpper': 'Majúscula',
|
||||||
@@ -196,28 +201,17 @@ const native: TranslationStrings = {
|
|||||||
'native.welcome.photosTitle': 'Fotos i fotollibre',
|
'native.welcome.photosTitle': 'Fotos i fotollibre',
|
||||||
'native.welcome.photosSub': 'Els records es queden amb el viatge',
|
'native.welcome.photosSub': 'Els records es queden amb el viatge',
|
||||||
'native.welcome.discover': 'Descobreix els plans cloud',
|
'native.welcome.discover': 'Descobreix els plans cloud',
|
||||||
'native.trip.start.title': 'Escapada',
|
|
||||||
'native.trip.start.text': 'Viatges curts, sobretot planificar.',
|
|
||||||
'native.trip.basis.title': 'Ruta per etapes',
|
|
||||||
'native.trip.basis.text': 'Diverses parades, reserves automàtiques.',
|
|
||||||
'native.trip.plus.title': 'Gran viatge',
|
|
||||||
'native.trip.plus.text': 'Setmanes de viatge, amb tot el grup.',
|
|
||||||
'native.trip.pro.title': 'Rodamón',
|
|
||||||
'native.trip.pro.text': 'Per a qui viatja sovint i fa fotollibres grans.',
|
|
||||||
'native.plans.unlimited': 'Il·limitat',
|
'native.plans.unlimited': 'Il·limitat',
|
||||||
'native.plans.unlimitedSub': 'Viatges i companys de viatge',
|
'native.plans.unlimitedSub': 'Viatges i companys de viatge',
|
||||||
'native.plans.inEveryPlan': 'en tots els plans',
|
|
||||||
'native.plans.yearlyIs': '{price} l’any, cancel·la quan vulguis',
|
'native.plans.yearlyIs': '{price} l’any, cancel·la quan vulguis',
|
||||||
'native.plans.monthlyIs': 'Són {price} al mes',
|
'native.plans.monthlyIs': 'Són {price} al mes',
|
||||||
'native.plans.storageFairUse': 'Emmagatzematge d’ús raonable',
|
'native.plans.storage': 'Emmagatzematge',
|
||||||
'native.plans.aiPerMonth': '{n} / mes',
|
'native.plans.notIncluded': 'No inclòs',
|
||||||
'native.plans.aiNone': 'No inclòs',
|
|
||||||
'native.plans.included': 'Inclòs',
|
'native.plans.included': 'Inclòs',
|
||||||
'native.plans.planned': 'Previst',
|
|
||||||
'native.plans.assistant': 'Assistent d’IA',
|
'native.plans.assistant': 'Assistent d’IA',
|
||||||
'native.plans.mailImport': 'Importació automàtica de correus',
|
'native.plans.mailImport': 'Importació automàtica de correus',
|
||||||
'native.plans.aiLabel': 'Documents IA',
|
'native.plans.aiLabel': 'Documents IA',
|
||||||
'native.plans.choose': 'Tria {trip}',
|
'native.plans.choose': 'Tria {plan}',
|
||||||
'native.plans.termsShort': 'Condicions d’ús (EULA)',
|
'native.plans.termsShort': 'Condicions d’ús (EULA)',
|
||||||
'native.plans.privacyShort': 'Privadesa',
|
'native.plans.privacyShort': 'Privadesa',
|
||||||
'native.plans.billing': 'Facturació',
|
'native.plans.billing': 'Facturació',
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
import type { TranslationStrings } from '../types';
|
import type { TranslationStrings } from '../types';
|
||||||
|
|
||||||
const native: TranslationStrings = {
|
const native: TranslationStrings = {
|
||||||
|
'native.trial.cancelApple':
|
||||||
|
'Platbě předejdete zrušením předplatného v App Storu nejpozději 24 hodin před koncem zkušební doby.',
|
||||||
|
'native.trial.cancelPlay': 'Platbě předejdete zrušením předplatného na Google Play před koncem zkušební doby.',
|
||||||
|
'native.trial.badge': '7 dní zdarma',
|
||||||
|
'native.trial.price': '7 dní zdarma, poté {price} {period}.',
|
||||||
|
'native.trial.changed': 'Nabídka se změnila. Vraťte se k tarifům a zkontrolujte aktuální cenu.',
|
||||||
'native.connect.title': 'Připojit k TREK',
|
'native.connect.title': 'Připojit k TREK',
|
||||||
'native.connect.hint': 'Zadejte adresu, na které otevíráte TREK v prohlížeči.',
|
'native.connect.hint': 'Zadejte adresu, na které otevíráte TREK v prohlížeči.',
|
||||||
'native.connect.placeholder': 'https://trek.example.com',
|
'native.connect.placeholder': 'https://trek.example.com',
|
||||||
@@ -64,7 +70,6 @@ const native: TranslationStrings = {
|
|||||||
'native.plans.legalAndroid':
|
'native.plans.legalAndroid':
|
||||||
'Platba se při potvrzení strhne z vašeho účtu Google. Předplatné se automaticky obnovuje, pokud je nezrušíte před koncem období. Spravovat nebo zrušit ho můžete v Google Play v části Profil, Platby a odběry, Odběry.',
|
'Platba se při potvrzení strhne z vašeho účtu Google. Předplatné se automaticky obnovuje, pokud je nezrušíte před koncem období. Spravovat nebo zrušit ho můžete v Google Play v části Profil, Platby a odběry, Odběry.',
|
||||||
'native.plans.restoreNoneAndroid': 'Pro tento účet Google nebylo nalezeno žádné aktivní předplatné.',
|
'native.plans.restoreNoneAndroid': 'Pro tento účet Google nebylo nalezeno žádné aktivní předplatné.',
|
||||||
'native.plans.recommended': 'Doporučeno',
|
|
||||||
'native.claim.change': 'Změnit',
|
'native.claim.change': 'Změnit',
|
||||||
'native.claim.ruleLength': 'znaků',
|
'native.claim.ruleLength': 'znaků',
|
||||||
'native.claim.ruleUpper': 'Velké písmeno',
|
'native.claim.ruleUpper': 'Velké písmeno',
|
||||||
@@ -189,28 +194,17 @@ const native: TranslationStrings = {
|
|||||||
'native.welcome.photosTitle': 'Fotky a fotokniha',
|
'native.welcome.photosTitle': 'Fotky a fotokniha',
|
||||||
'native.welcome.photosSub': 'Vzpomínky zůstávají u cesty',
|
'native.welcome.photosSub': 'Vzpomínky zůstávají u cesty',
|
||||||
'native.welcome.discover': 'Prohlédnout cloudové tarify',
|
'native.welcome.discover': 'Prohlédnout cloudové tarify',
|
||||||
'native.trip.start.title': 'Víkendovka',
|
|
||||||
'native.trip.start.text': 'Krátké cesty, hlavně plánování.',
|
|
||||||
'native.trip.basis.title': 'Okružní cesta',
|
|
||||||
'native.trip.basis.text': 'Více míst, rezervace automaticky.',
|
|
||||||
'native.trip.plus.title': 'Velká cesta',
|
|
||||||
'native.trip.plus.text': 'Týdny na cestách, s celou skupinou.',
|
|
||||||
'native.trip.pro.title': 'Světoběžník',
|
|
||||||
'native.trip.pro.text': 'Pro časté cestovatele a velké fotoknihy.',
|
|
||||||
'native.plans.unlimited': 'Neomezeně',
|
'native.plans.unlimited': 'Neomezeně',
|
||||||
'native.plans.unlimitedSub': 'Cesty a spolucestující',
|
'native.plans.unlimitedSub': 'Cesty a spolucestující',
|
||||||
'native.plans.inEveryPlan': 'v každém tarifu',
|
|
||||||
'native.plans.yearlyIs': '{price} ročně, zrušení kdykoli',
|
'native.plans.yearlyIs': '{price} ročně, zrušení kdykoli',
|
||||||
'native.plans.monthlyIs': 'To je {price} měsíčně',
|
'native.plans.monthlyIs': 'To je {price} měsíčně',
|
||||||
'native.plans.storageFairUse': 'Úložiště v režimu férového využití',
|
'native.plans.storage': 'Úložiště',
|
||||||
'native.plans.aiPerMonth': '{n} / měsíc',
|
'native.plans.notIncluded': 'Není součástí',
|
||||||
'native.plans.aiNone': 'Není součástí',
|
|
||||||
'native.plans.included': 'Součástí',
|
'native.plans.included': 'Součástí',
|
||||||
'native.plans.planned': 'Plánováno',
|
|
||||||
'native.plans.assistant': 'Asistent AI',
|
'native.plans.assistant': 'Asistent AI',
|
||||||
'native.plans.mailImport': 'Automatický import e-mailů',
|
'native.plans.mailImport': 'Automatický import e-mailů',
|
||||||
'native.plans.aiLabel': 'Dokumenty AI',
|
'native.plans.aiLabel': 'Dokumenty AI',
|
||||||
'native.plans.choose': 'Vybrat: {trip}',
|
'native.plans.choose': 'Vybrat: {plan}',
|
||||||
'native.plans.termsShort': 'Podmínky použití (EULA)',
|
'native.plans.termsShort': 'Podmínky použití (EULA)',
|
||||||
'native.plans.privacyShort': 'Soukromí',
|
'native.plans.privacyShort': 'Soukromí',
|
||||||
'native.plans.billing': 'Platba',
|
'native.plans.billing': 'Platba',
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
import type { TranslationStrings } from '../types';
|
import type { TranslationStrings } from '../types';
|
||||||
|
|
||||||
const native: TranslationStrings = {
|
const native: TranslationStrings = {
|
||||||
|
'native.trial.cancelApple':
|
||||||
|
'Kündige im App Store mindestens 24 Stunden vor Ende der Testphase, um eine Abbuchung zu vermeiden.',
|
||||||
|
'native.trial.cancelPlay': 'Kündige bei Google Play vor Ende der Testphase, um eine Abbuchung zu vermeiden.',
|
||||||
|
'native.trial.badge': '7 Tage kostenlos',
|
||||||
|
'native.trial.price': '7 Tage kostenlos, danach {price} {period}.',
|
||||||
|
'native.trial.changed': 'Das Angebot hat sich geändert. Geh zurück zur Tarifauswahl und prüfe den aktuellen Preis.',
|
||||||
'native.connect.title': 'Mit TREK verbinden',
|
'native.connect.title': 'Mit TREK verbinden',
|
||||||
'native.connect.hint': 'Gib die Adresse ein, unter der du TREK im Browser öffnest.',
|
'native.connect.hint': 'Gib die Adresse ein, unter der du TREK im Browser öffnest.',
|
||||||
'native.connect.placeholder': 'https://trek.example.com',
|
'native.connect.placeholder': 'https://trek.example.com',
|
||||||
@@ -67,7 +73,6 @@ const native: TranslationStrings = {
|
|||||||
'native.plans.legalAndroid':
|
'native.plans.legalAndroid':
|
||||||
'Die Zahlung wird bei Bestätigung über dein Google-Konto abgerechnet. Das Abo verlängert sich automatisch, wenn du es nicht vor Ablauf des Zeitraums kündigst. Verwalten und kündigen kannst du es in Google Play unter Profil, Zahlungen und Abos, Abos.',
|
'Die Zahlung wird bei Bestätigung über dein Google-Konto abgerechnet. Das Abo verlängert sich automatisch, wenn du es nicht vor Ablauf des Zeitraums kündigst. Verwalten und kündigen kannst du es in Google Play unter Profil, Zahlungen und Abos, Abos.',
|
||||||
'native.plans.restoreNoneAndroid': 'Für dieses Google-Konto wurde kein aktives Abo gefunden.',
|
'native.plans.restoreNoneAndroid': 'Für dieses Google-Konto wurde kein aktives Abo gefunden.',
|
||||||
'native.plans.recommended': 'Empfohlen',
|
|
||||||
'native.claim.change': 'Ändern',
|
'native.claim.change': 'Ändern',
|
||||||
'native.claim.ruleLength': 'Zeichen',
|
'native.claim.ruleLength': 'Zeichen',
|
||||||
'native.claim.ruleUpper': 'Großbuchstabe',
|
'native.claim.ruleUpper': 'Großbuchstabe',
|
||||||
@@ -199,28 +204,17 @@ const native: TranslationStrings = {
|
|||||||
'native.welcome.photosTitle': 'Fotos und Fotobuch',
|
'native.welcome.photosTitle': 'Fotos und Fotobuch',
|
||||||
'native.welcome.photosSub': 'Die Erinnerungen bleiben bei der Reise',
|
'native.welcome.photosSub': 'Die Erinnerungen bleiben bei der Reise',
|
||||||
'native.welcome.discover': 'Cloud-Tarife entdecken',
|
'native.welcome.discover': 'Cloud-Tarife entdecken',
|
||||||
'native.trip.start.title': 'Wochenendtrip',
|
|
||||||
'native.trip.start.text': 'Kurze Reisen, vor allem planen.',
|
|
||||||
'native.trip.basis.title': 'Rundreise',
|
|
||||||
'native.trip.basis.text': 'Mehrere Orte, Buchungen automatisch.',
|
|
||||||
'native.trip.plus.title': 'Große Reise',
|
|
||||||
'native.trip.plus.text': 'Wochenlang unterwegs, mit der ganzen Gruppe.',
|
|
||||||
'native.trip.pro.title': 'Weltenbummler',
|
|
||||||
'native.trip.pro.text': 'Für Vielreisende und große Fotobücher.',
|
|
||||||
'native.plans.unlimited': 'Unbegrenzt',
|
'native.plans.unlimited': 'Unbegrenzt',
|
||||||
'native.plans.unlimitedSub': 'Reisen und Mitreisende',
|
'native.plans.unlimitedSub': 'Reisen und Mitreisende',
|
||||||
'native.plans.inEveryPlan': 'in jedem Tarif',
|
|
||||||
'native.plans.yearlyIs': 'Jährlich {price}, jederzeit kündbar',
|
'native.plans.yearlyIs': 'Jährlich {price}, jederzeit kündbar',
|
||||||
'native.plans.monthlyIs': 'Das sind {price} im Monat',
|
'native.plans.monthlyIs': 'Das sind {price} im Monat',
|
||||||
'native.plans.storageFairUse': 'Speicher unter Fair Use',
|
'native.plans.storage': 'Speicher',
|
||||||
'native.plans.aiPerMonth': '{n} / Monat',
|
'native.plans.notIncluded': 'Nicht enthalten',
|
||||||
'native.plans.aiNone': 'Nicht enthalten',
|
|
||||||
'native.plans.included': 'Enthalten',
|
'native.plans.included': 'Enthalten',
|
||||||
'native.plans.planned': 'Geplant',
|
|
||||||
'native.plans.assistant': 'KI-Assistent',
|
'native.plans.assistant': 'KI-Assistent',
|
||||||
'native.plans.mailImport': 'Automatischer E-Mail-Import',
|
'native.plans.mailImport': 'Auto-Mail-Import',
|
||||||
'native.plans.aiLabel': 'KI-Dokumente',
|
'native.plans.aiLabel': 'KI-Dokumente',
|
||||||
'native.plans.choose': '{trip} wählen',
|
'native.plans.choose': '{plan} wählen',
|
||||||
'native.plans.termsShort': 'Nutzungsbedingungen (EULA)',
|
'native.plans.termsShort': 'Nutzungsbedingungen (EULA)',
|
||||||
'native.plans.privacyShort': 'Datenschutz',
|
'native.plans.privacyShort': 'Datenschutz',
|
||||||
'native.plans.billing': 'Zahlweise',
|
'native.plans.billing': 'Zahlweise',
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
import type { TranslationStrings } from '../types';
|
import type { TranslationStrings } from '../types';
|
||||||
|
|
||||||
const native: TranslationStrings = {
|
const native: TranslationStrings = {
|
||||||
|
'native.trial.cancelApple':
|
||||||
|
'To avoid being charged, cancel in the App Store at least 24 hours before the trial ends.',
|
||||||
|
'native.trial.cancelPlay': 'To avoid being charged, cancel in Google Play before the trial ends.',
|
||||||
|
'native.trial.badge': '7 days free',
|
||||||
|
'native.trial.price': '7 days free, then {price} {period}.',
|
||||||
|
'native.trial.changed': 'The offer has changed. Go back to your plans and check the current price.',
|
||||||
'native.connect.title': 'Connect to TREK',
|
'native.connect.title': 'Connect to TREK',
|
||||||
'native.connect.hint': 'Enter the address you open TREK at in your browser.',
|
'native.connect.hint': 'Enter the address you open TREK at in your browser.',
|
||||||
'native.connect.placeholder': 'https://trek.example.com',
|
'native.connect.placeholder': 'https://trek.example.com',
|
||||||
@@ -66,7 +72,6 @@ const native: TranslationStrings = {
|
|||||||
'native.plans.legalAndroid':
|
'native.plans.legalAndroid':
|
||||||
'Payment is charged to your Google account when you confirm. The subscription renews automatically unless you cancel it before the period ends. Manage or cancel it in Google Play under Profile, Payments and subscriptions, Subscriptions.',
|
'Payment is charged to your Google account when you confirm. The subscription renews automatically unless you cancel it before the period ends. Manage or cancel it in Google Play under Profile, Payments and subscriptions, Subscriptions.',
|
||||||
'native.plans.restoreNoneAndroid': 'No active subscription found on this Google account.',
|
'native.plans.restoreNoneAndroid': 'No active subscription found on this Google account.',
|
||||||
'native.plans.recommended': 'Recommended',
|
|
||||||
'native.claim.change': 'Change',
|
'native.claim.change': 'Change',
|
||||||
'native.claim.ruleLength': 'characters',
|
'native.claim.ruleLength': 'characters',
|
||||||
'native.claim.ruleUpper': 'Uppercase',
|
'native.claim.ruleUpper': 'Uppercase',
|
||||||
@@ -194,28 +199,17 @@ const native: TranslationStrings = {
|
|||||||
'native.welcome.photosTitle': 'Photos and photo book',
|
'native.welcome.photosTitle': 'Photos and photo book',
|
||||||
'native.welcome.photosSub': 'The memories stay with the trip',
|
'native.welcome.photosSub': 'The memories stay with the trip',
|
||||||
'native.welcome.discover': 'Explore cloud plans',
|
'native.welcome.discover': 'Explore cloud plans',
|
||||||
'native.trip.start.title': 'Weekend trip',
|
|
||||||
'native.trip.start.text': 'Short trips, mostly planning.',
|
|
||||||
'native.trip.basis.title': 'Round trip',
|
|
||||||
'native.trip.basis.text': 'Several stops, bookings sorted automatically.',
|
|
||||||
'native.trip.plus.title': 'Big journey',
|
|
||||||
'native.trip.plus.text': 'Weeks on the road, with the whole group.',
|
|
||||||
'native.trip.pro.title': 'Globetrotter',
|
|
||||||
'native.trip.pro.text': 'For frequent travellers and big photo books.',
|
|
||||||
'native.plans.unlimited': 'Unlimited',
|
'native.plans.unlimited': 'Unlimited',
|
||||||
'native.plans.unlimitedSub': 'Trips and travel companions',
|
'native.plans.unlimitedSub': 'Trips and travel companions',
|
||||||
'native.plans.inEveryPlan': 'in every plan',
|
|
||||||
'native.plans.yearlyIs': 'Yearly {price}, cancel anytime',
|
'native.plans.yearlyIs': 'Yearly {price}, cancel anytime',
|
||||||
'native.plans.monthlyIs': 'That is {price} a month',
|
'native.plans.monthlyIs': 'That is {price} a month',
|
||||||
'native.plans.storageFairUse': 'Storage fair use',
|
'native.plans.storage': 'Storage',
|
||||||
'native.plans.aiPerMonth': '{n} / month',
|
'native.plans.notIncluded': 'Not included',
|
||||||
'native.plans.aiNone': 'Not included',
|
|
||||||
'native.plans.included': 'Included',
|
'native.plans.included': 'Included',
|
||||||
'native.plans.planned': 'Planned',
|
|
||||||
'native.plans.assistant': 'AI Assistant',
|
'native.plans.assistant': 'AI Assistant',
|
||||||
'native.plans.mailImport': 'Automated Mail Import',
|
'native.plans.mailImport': 'Automated Mail Import',
|
||||||
'native.plans.aiLabel': 'AI documents',
|
'native.plans.aiLabel': 'AI documents',
|
||||||
'native.plans.choose': 'Choose {trip}',
|
'native.plans.choose': 'Choose {plan}',
|
||||||
'native.plans.termsShort': 'Terms of Use (EULA)',
|
'native.plans.termsShort': 'Terms of Use (EULA)',
|
||||||
'native.plans.privacyShort': 'Privacy',
|
'native.plans.privacyShort': 'Privacy',
|
||||||
'native.plans.billing': 'Billing',
|
'native.plans.billing': 'Billing',
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
import type { TranslationStrings } from '../types';
|
import type { TranslationStrings } from '../types';
|
||||||
|
|
||||||
const native: TranslationStrings = {
|
const native: TranslationStrings = {
|
||||||
|
'native.trial.cancelApple':
|
||||||
|
'Para evitar el cobro, cancela en el App Store al menos 24 horas antes de que termine la prueba.',
|
||||||
|
'native.trial.cancelPlay': 'Para evitar el cobro, cancela en Google Play antes de que termine la prueba.',
|
||||||
|
'native.trial.badge': '7 días gratis',
|
||||||
|
'native.trial.price': '7 días gratis, después {price} {period}.',
|
||||||
|
'native.trial.changed': 'La oferta ha cambiado. Vuelve a los planes y consulta el precio actual.',
|
||||||
'native.connect.title': 'Conectar con TREK',
|
'native.connect.title': 'Conectar con TREK',
|
||||||
'native.connect.hint': 'Introduce la dirección con la que abres TREK en tu navegador.',
|
'native.connect.hint': 'Introduce la dirección con la que abres TREK en tu navegador.',
|
||||||
'native.connect.placeholder': 'https://trek.example.com',
|
'native.connect.placeholder': 'https://trek.example.com',
|
||||||
@@ -66,7 +72,6 @@ const native: TranslationStrings = {
|
|||||||
'native.plans.legalAndroid':
|
'native.plans.legalAndroid':
|
||||||
'El pago se carga a tu cuenta de Google al confirmar. La suscripción se renueva automáticamente salvo que la canceles antes de que termine el periodo. Gestiónala o cancélala en Google Play, en Perfil, Pagos y suscripciones, Suscripciones.',
|
'El pago se carga a tu cuenta de Google al confirmar. La suscripción se renueva automáticamente salvo que la canceles antes de que termine el periodo. Gestiónala o cancélala en Google Play, en Perfil, Pagos y suscripciones, Suscripciones.',
|
||||||
'native.plans.restoreNoneAndroid': 'No se encontró ninguna suscripción activa en esta cuenta de Google.',
|
'native.plans.restoreNoneAndroid': 'No se encontró ninguna suscripción activa en esta cuenta de Google.',
|
||||||
'native.plans.recommended': 'Recomendado',
|
|
||||||
'native.claim.change': 'Cambiar',
|
'native.claim.change': 'Cambiar',
|
||||||
'native.claim.ruleLength': 'caracteres',
|
'native.claim.ruleLength': 'caracteres',
|
||||||
'native.claim.ruleUpper': 'Mayúscula',
|
'native.claim.ruleUpper': 'Mayúscula',
|
||||||
@@ -194,28 +199,17 @@ const native: TranslationStrings = {
|
|||||||
'native.welcome.photosTitle': 'Fotos y fotolibro',
|
'native.welcome.photosTitle': 'Fotos y fotolibro',
|
||||||
'native.welcome.photosSub': 'Los recuerdos se quedan con el viaje',
|
'native.welcome.photosSub': 'Los recuerdos se quedan con el viaje',
|
||||||
'native.welcome.discover': 'Descubrir los planes cloud',
|
'native.welcome.discover': 'Descubrir los planes cloud',
|
||||||
'native.trip.start.title': 'Escapada',
|
|
||||||
'native.trip.start.text': 'Viajes cortos, sobre todo planificar.',
|
|
||||||
'native.trip.basis.title': 'Ruta por etapas',
|
|
||||||
'native.trip.basis.text': 'Varias paradas, reservas automáticas.',
|
|
||||||
'native.trip.plus.title': 'Gran viaje',
|
|
||||||
'native.trip.plus.text': 'Semanas de viaje, con todo el grupo.',
|
|
||||||
'native.trip.pro.title': 'Trotamundos',
|
|
||||||
'native.trip.pro.text': 'Para viajeros frecuentes y grandes fotolibros.',
|
|
||||||
'native.plans.unlimited': 'Ilimitado',
|
'native.plans.unlimited': 'Ilimitado',
|
||||||
'native.plans.unlimitedSub': 'Viajes y compañeros de viaje',
|
'native.plans.unlimitedSub': 'Viajes y compañeros de viaje',
|
||||||
'native.plans.inEveryPlan': 'en todos los planes',
|
|
||||||
'native.plans.yearlyIs': '{price} al año, cancela cuando quieras',
|
'native.plans.yearlyIs': '{price} al año, cancela cuando quieras',
|
||||||
'native.plans.monthlyIs': 'Son {price} al mes',
|
'native.plans.monthlyIs': 'Son {price} al mes',
|
||||||
'native.plans.storageFairUse': 'Almacenamiento de uso razonable',
|
'native.plans.storage': 'Almacenamiento',
|
||||||
'native.plans.aiPerMonth': '{n} / mes',
|
'native.plans.notIncluded': 'No incluido',
|
||||||
'native.plans.aiNone': 'No incluido',
|
|
||||||
'native.plans.included': 'Incluido',
|
'native.plans.included': 'Incluido',
|
||||||
'native.plans.planned': 'Previsto',
|
|
||||||
'native.plans.assistant': 'Asistente de IA',
|
'native.plans.assistant': 'Asistente de IA',
|
||||||
'native.plans.mailImport': 'Importación automática de correo',
|
'native.plans.mailImport': 'Importación automática de correo',
|
||||||
'native.plans.aiLabel': 'Documentos IA',
|
'native.plans.aiLabel': 'Documentos IA',
|
||||||
'native.plans.choose': 'Elegir {trip}',
|
'native.plans.choose': 'Elegir {plan}',
|
||||||
'native.plans.termsShort': 'Condiciones de uso (EULA)',
|
'native.plans.termsShort': 'Condiciones de uso (EULA)',
|
||||||
'native.plans.privacyShort': 'Privacidad',
|
'native.plans.privacyShort': 'Privacidad',
|
||||||
'native.plans.billing': 'Facturación',
|
'native.plans.billing': 'Facturación',
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
import type { TranslationStrings } from '../types';
|
import type { TranslationStrings } from '../types';
|
||||||
|
|
||||||
const native: TranslationStrings = {
|
const native: TranslationStrings = {
|
||||||
|
'native.trial.cancelApple':
|
||||||
|
'Makse vältimiseks tühista tellimus App Store’is vähemalt 24 tundi enne prooviperioodi lõppu.',
|
||||||
|
'native.trial.cancelPlay': 'Makse vältimiseks tühista tellimus Google Plays enne prooviperioodi lõppu.',
|
||||||
|
'native.trial.badge': '7 päeva tasuta',
|
||||||
|
'native.trial.price': '7 päeva tasuta, seejärel {price} {period}.',
|
||||||
|
'native.trial.changed': 'Pakkumine on muutunud. Mine tagasi pakettide juurde ja kontrolli praegust hinda.',
|
||||||
'native.connect.title': 'Ühenda TREKiga',
|
'native.connect.title': 'Ühenda TREKiga',
|
||||||
'native.connect.hint': 'Sisesta aadress, millel avad TREKi brauseris.',
|
'native.connect.hint': 'Sisesta aadress, millel avad TREKi brauseris.',
|
||||||
'native.connect.placeholder': 'https://trek.example.com',
|
'native.connect.placeholder': 'https://trek.example.com',
|
||||||
@@ -65,7 +71,6 @@ const native: TranslationStrings = {
|
|||||||
'native.plans.legalAndroid':
|
'native.plans.legalAndroid':
|
||||||
"Makse võetakse kinnitamisel sinu Google'i kontolt. Tellimus uueneb automaatselt, kui sa ei tühista seda enne perioodi lõppu. Halda või tühista seda Google Plays: Profiil, Maksed ja tellimused, Tellimused.",
|
"Makse võetakse kinnitamisel sinu Google'i kontolt. Tellimus uueneb automaatselt, kui sa ei tühista seda enne perioodi lõppu. Halda või tühista seda Google Plays: Profiil, Maksed ja tellimused, Tellimused.",
|
||||||
'native.plans.restoreNoneAndroid': "Selle Google'i kontoga ei leitud aktiivset tellimust.",
|
'native.plans.restoreNoneAndroid': "Selle Google'i kontoga ei leitud aktiivset tellimust.",
|
||||||
'native.plans.recommended': 'Soovitatud',
|
|
||||||
'native.claim.change': 'Muuda',
|
'native.claim.change': 'Muuda',
|
||||||
'native.claim.ruleLength': 'märki',
|
'native.claim.ruleLength': 'märki',
|
||||||
'native.claim.ruleUpper': 'Suurtäht',
|
'native.claim.ruleUpper': 'Suurtäht',
|
||||||
@@ -191,28 +196,17 @@ const native: TranslationStrings = {
|
|||||||
'native.welcome.photosTitle': 'Fotod ja fotoraamat',
|
'native.welcome.photosTitle': 'Fotod ja fotoraamat',
|
||||||
'native.welcome.photosSub': 'Mälestused jäävad reisi juurde',
|
'native.welcome.photosSub': 'Mälestused jäävad reisi juurde',
|
||||||
'native.welcome.discover': 'Vaata pilvepakette',
|
'native.welcome.discover': 'Vaata pilvepakette',
|
||||||
'native.trip.start.title': 'Nädalavahetus',
|
|
||||||
'native.trip.start.text': 'Lühikesed reisid, peamiselt planeerimine.',
|
|
||||||
'native.trip.basis.title': 'Ringreis',
|
|
||||||
'native.trip.basis.text': 'Mitu peatust, broneeringud automaatselt.',
|
|
||||||
'native.trip.plus.title': 'Suur reis',
|
|
||||||
'native.trip.plus.text': 'Nädalaid teel, kogu seltskonnaga.',
|
|
||||||
'native.trip.pro.title': 'Maailmarändur',
|
|
||||||
'native.trip.pro.text': 'Sagedastele reisijatele ja suurtele fotoraamatutele.',
|
|
||||||
'native.plans.unlimited': 'Piiramatult',
|
'native.plans.unlimited': 'Piiramatult',
|
||||||
'native.plans.unlimitedSub': 'Reisid ja kaasreisijad',
|
'native.plans.unlimitedSub': 'Reisid ja kaasreisijad',
|
||||||
'native.plans.inEveryPlan': 'igas paketis',
|
|
||||||
'native.plans.yearlyIs': '{price} aastas, tühista igal ajal',
|
'native.plans.yearlyIs': '{price} aastas, tühista igal ajal',
|
||||||
'native.plans.monthlyIs': 'See on {price} kuus',
|
'native.plans.monthlyIs': 'See on {price} kuus',
|
||||||
'native.plans.storageFairUse': 'Õiglase kasutuse salvestusruum',
|
'native.plans.storage': 'Salvestusruum',
|
||||||
'native.plans.aiPerMonth': '{n} / kuus',
|
'native.plans.notIncluded': 'Ei sisaldu',
|
||||||
'native.plans.aiNone': 'Ei sisaldu',
|
|
||||||
'native.plans.included': 'Sisaldub',
|
'native.plans.included': 'Sisaldub',
|
||||||
'native.plans.planned': 'Plaanis',
|
|
||||||
'native.plans.assistant': 'AI-assistent',
|
'native.plans.assistant': 'AI-assistent',
|
||||||
'native.plans.mailImport': 'Automaatne e-kirjade import',
|
'native.plans.mailImport': 'Automaatne e-kirjade import',
|
||||||
'native.plans.aiLabel': 'TI-dokumendid',
|
'native.plans.aiLabel': 'TI-dokumendid',
|
||||||
'native.plans.choose': 'Vali {trip}',
|
'native.plans.choose': 'Vali {plan}',
|
||||||
'native.plans.termsShort': 'Kasutustingimused (EULA)',
|
'native.plans.termsShort': 'Kasutustingimused (EULA)',
|
||||||
'native.plans.privacyShort': 'Privaatsus',
|
'native.plans.privacyShort': 'Privaatsus',
|
||||||
'native.plans.billing': 'Maksmine',
|
'native.plans.billing': 'Maksmine',
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
import type { TranslationStrings } from '../types';
|
import type { TranslationStrings } from '../types';
|
||||||
|
|
||||||
const native: TranslationStrings = {
|
const native: TranslationStrings = {
|
||||||
|
'native.trial.cancelApple':
|
||||||
|
'Pour éviter un paiement, résilie dans l’App Store au moins 24 heures avant la fin de l’essai.',
|
||||||
|
'native.trial.cancelPlay': 'Pour éviter un paiement, résilie dans Google Play avant la fin de l’essai.',
|
||||||
|
'native.trial.badge': '7 jours gratuits',
|
||||||
|
'native.trial.price': '7 jours gratuits, puis {price} {period}.',
|
||||||
|
'native.trial.changed': 'L’offre a changé. Reviens aux forfaits et vérifie le prix actuel.',
|
||||||
'native.connect.title': 'Se connecter à TREK',
|
'native.connect.title': 'Se connecter à TREK',
|
||||||
'native.connect.hint': 'Saisissez l’adresse à laquelle vous ouvrez TREK dans votre navigateur.',
|
'native.connect.hint': 'Saisissez l’adresse à laquelle vous ouvrez TREK dans votre navigateur.',
|
||||||
'native.connect.placeholder': 'https://trek.example.com',
|
'native.connect.placeholder': 'https://trek.example.com',
|
||||||
@@ -67,7 +73,6 @@ const native: TranslationStrings = {
|
|||||||
'native.plans.legalAndroid':
|
'native.plans.legalAndroid':
|
||||||
'Le paiement est débité de votre compte Google lors de la confirmation. L’abonnement se renouvelle automatiquement, sauf si vous le résiliez avant la fin de la période. Gérez-le ou résiliez-le dans Google Play sous Profil, Paiements et abonnements, Abonnements.',
|
'Le paiement est débité de votre compte Google lors de la confirmation. L’abonnement se renouvelle automatiquement, sauf si vous le résiliez avant la fin de la période. Gérez-le ou résiliez-le dans Google Play sous Profil, Paiements et abonnements, Abonnements.',
|
||||||
'native.plans.restoreNoneAndroid': 'Aucun abonnement actif trouvé pour ce compte Google.',
|
'native.plans.restoreNoneAndroid': 'Aucun abonnement actif trouvé pour ce compte Google.',
|
||||||
'native.plans.recommended': 'Recommandé',
|
|
||||||
'native.claim.change': 'Modifier',
|
'native.claim.change': 'Modifier',
|
||||||
'native.claim.ruleLength': 'caractères',
|
'native.claim.ruleLength': 'caractères',
|
||||||
'native.claim.ruleUpper': 'Majuscule',
|
'native.claim.ruleUpper': 'Majuscule',
|
||||||
@@ -198,28 +203,17 @@ const native: TranslationStrings = {
|
|||||||
'native.welcome.photosTitle': 'Photos et livre photo',
|
'native.welcome.photosTitle': 'Photos et livre photo',
|
||||||
'native.welcome.photosSub': 'Les souvenirs restent avec le voyage',
|
'native.welcome.photosSub': 'Les souvenirs restent avec le voyage',
|
||||||
'native.welcome.discover': 'Découvrir les offres cloud',
|
'native.welcome.discover': 'Découvrir les offres cloud',
|
||||||
'native.trip.start.title': 'Week-end',
|
|
||||||
'native.trip.start.text': 'Courts séjours, surtout de la planification.',
|
|
||||||
'native.trip.basis.title': 'Circuit',
|
|
||||||
'native.trip.basis.text': 'Plusieurs étapes, réservations automatiques.',
|
|
||||||
'native.trip.plus.title': 'Grand voyage',
|
|
||||||
'native.trip.plus.text': 'Des semaines sur la route, avec tout le groupe.',
|
|
||||||
'native.trip.pro.title': 'Globe-trotteur',
|
|
||||||
'native.trip.pro.text': 'Pour les grands voyageurs et les grands livres photo.',
|
|
||||||
'native.plans.unlimited': 'Illimité',
|
'native.plans.unlimited': 'Illimité',
|
||||||
'native.plans.unlimitedSub': 'Voyages et compagnons de voyage',
|
'native.plans.unlimitedSub': 'Voyages et compagnons de voyage',
|
||||||
'native.plans.inEveryPlan': 'dans chaque offre',
|
|
||||||
'native.plans.yearlyIs': '{price} par an, résiliable à tout moment',
|
'native.plans.yearlyIs': '{price} par an, résiliable à tout moment',
|
||||||
'native.plans.monthlyIs': 'Soit {price} par mois',
|
'native.plans.monthlyIs': 'Soit {price} par mois',
|
||||||
'native.plans.storageFairUse': 'Stockage en usage raisonnable',
|
'native.plans.storage': 'Stockage',
|
||||||
'native.plans.aiPerMonth': '{n} / mois',
|
'native.plans.notIncluded': 'Non inclus',
|
||||||
'native.plans.aiNone': 'Non inclus',
|
|
||||||
'native.plans.included': 'Inclus',
|
'native.plans.included': 'Inclus',
|
||||||
'native.plans.planned': 'Prévu',
|
|
||||||
'native.plans.assistant': 'Assistant IA',
|
'native.plans.assistant': 'Assistant IA',
|
||||||
'native.plans.mailImport': 'Import automatique des e-mails',
|
'native.plans.mailImport': 'Import automatique des e-mails',
|
||||||
'native.plans.aiLabel': 'Documents IA',
|
'native.plans.aiLabel': 'Documents IA',
|
||||||
'native.plans.choose': 'Choisir {trip}',
|
'native.plans.choose': 'Choisir {plan}',
|
||||||
'native.plans.termsShort': 'Conditions d’utilisation (EULA)',
|
'native.plans.termsShort': 'Conditions d’utilisation (EULA)',
|
||||||
'native.plans.privacyShort': 'Confidentialité',
|
'native.plans.privacyShort': 'Confidentialité',
|
||||||
'native.plans.billing': 'Facturation',
|
'native.plans.billing': 'Facturation',
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
import type { TranslationStrings } from '../types';
|
import type { TranslationStrings } from '../types';
|
||||||
|
|
||||||
const native: TranslationStrings = {
|
const native: TranslationStrings = {
|
||||||
|
'native.trial.cancelApple': 'Για να μη χρεωθείς, ακύρωσε στο App Store τουλάχιστον 24 ώρες πριν λήξει η δοκιμή.',
|
||||||
|
'native.trial.cancelPlay': 'Για να μη χρεωθείς, ακύρωσε στο Google Play πριν λήξει η δοκιμή.',
|
||||||
|
'native.trial.badge': '7 ημέρες δωρεάν',
|
||||||
|
'native.trial.price': '7 ημέρες δωρεάν, μετά {price} {period}.',
|
||||||
|
'native.trial.changed': 'Η προσφορά άλλαξε. Γύρισε στα προγράμματα και έλεγξε την τρέχουσα τιμή.',
|
||||||
'native.connect.title': 'Σύνδεση στο TREK',
|
'native.connect.title': 'Σύνδεση στο TREK',
|
||||||
'native.connect.hint': 'Πληκτρολογήστε τη διεύθυνση με την οποία ανοίγετε το TREK στο πρόγραμμα περιήγησης.',
|
'native.connect.hint': 'Πληκτρολογήστε τη διεύθυνση με την οποία ανοίγετε το TREK στο πρόγραμμα περιήγησης.',
|
||||||
'native.connect.placeholder': 'https://trek.example.com',
|
'native.connect.placeholder': 'https://trek.example.com',
|
||||||
@@ -67,7 +72,6 @@ const native: TranslationStrings = {
|
|||||||
'native.plans.legalAndroid':
|
'native.plans.legalAndroid':
|
||||||
'Η πληρωμή χρεώνεται στον λογαριασμό σας Google κατά την επιβεβαίωση. Η συνδρομή ανανεώνεται αυτόματα, εκτός αν την ακυρώσετε πριν λήξει η περίοδος. Διαχειριστείτε ή ακυρώστε τη στο Google Play, στο Προφίλ, Πληρωμές και συνδρομές, Συνδρομές.',
|
'Η πληρωμή χρεώνεται στον λογαριασμό σας Google κατά την επιβεβαίωση. Η συνδρομή ανανεώνεται αυτόματα, εκτός αν την ακυρώσετε πριν λήξει η περίοδος. Διαχειριστείτε ή ακυρώστε τη στο Google Play, στο Προφίλ, Πληρωμές και συνδρομές, Συνδρομές.',
|
||||||
'native.plans.restoreNoneAndroid': 'Δεν βρέθηκε ενεργή συνδρομή σε αυτόν τον λογαριασμό Google.',
|
'native.plans.restoreNoneAndroid': 'Δεν βρέθηκε ενεργή συνδρομή σε αυτόν τον λογαριασμό Google.',
|
||||||
'native.plans.recommended': 'Προτείνεται',
|
|
||||||
'native.claim.change': 'Αλλαγή',
|
'native.claim.change': 'Αλλαγή',
|
||||||
'native.claim.ruleLength': 'χαρακτήρες',
|
'native.claim.ruleLength': 'χαρακτήρες',
|
||||||
'native.claim.ruleUpper': 'Κεφαλαίο',
|
'native.claim.ruleUpper': 'Κεφαλαίο',
|
||||||
@@ -201,28 +205,17 @@ const native: TranslationStrings = {
|
|||||||
'native.welcome.photosTitle': 'Φωτογραφίες και φωτοβιβλίο',
|
'native.welcome.photosTitle': 'Φωτογραφίες και φωτοβιβλίο',
|
||||||
'native.welcome.photosSub': 'Οι αναμνήσεις μένουν με το ταξίδι',
|
'native.welcome.photosSub': 'Οι αναμνήσεις μένουν με το ταξίδι',
|
||||||
'native.welcome.discover': 'Δείτε τα πακέτα cloud',
|
'native.welcome.discover': 'Δείτε τα πακέτα cloud',
|
||||||
'native.trip.start.title': 'Σαββατοκύριακο',
|
|
||||||
'native.trip.start.text': 'Σύντομα ταξίδια, κυρίως σχεδιασμός.',
|
|
||||||
'native.trip.basis.title': 'Περιήγηση',
|
|
||||||
'native.trip.basis.text': 'Πολλοί σταθμοί, κρατήσεις αυτόματα.',
|
|
||||||
'native.trip.plus.title': 'Μεγάλο ταξίδι',
|
|
||||||
'native.trip.plus.text': 'Εβδομάδες στον δρόμο, με όλη την ομάδα.',
|
|
||||||
'native.trip.pro.title': 'Κοσμογυρισμένος',
|
|
||||||
'native.trip.pro.text': 'Για όσους ταξιδεύουν συχνά και μεγάλα φωτοβιβλία.',
|
|
||||||
'native.plans.unlimited': 'Απεριόριστα',
|
'native.plans.unlimited': 'Απεριόριστα',
|
||||||
'native.plans.unlimitedSub': 'Ταξίδια και συνταξιδιώτες',
|
'native.plans.unlimitedSub': 'Ταξίδια και συνταξιδιώτες',
|
||||||
'native.plans.inEveryPlan': 'σε κάθε πακέτο',
|
|
||||||
'native.plans.yearlyIs': '{price} τον χρόνο, ακύρωση οποτεδήποτε',
|
'native.plans.yearlyIs': '{price} τον χρόνο, ακύρωση οποτεδήποτε',
|
||||||
'native.plans.monthlyIs': 'Δηλαδή {price} τον μήνα',
|
'native.plans.monthlyIs': 'Δηλαδή {price} τον μήνα',
|
||||||
'native.plans.storageFairUse': 'Αποθήκευση με εύλογη χρήση',
|
'native.plans.storage': 'Αποθήκευση',
|
||||||
'native.plans.aiPerMonth': '{n} / μήνα',
|
'native.plans.notIncluded': 'Δεν περιλαμβάνεται',
|
||||||
'native.plans.aiNone': 'Δεν περιλαμβάνεται',
|
|
||||||
'native.plans.included': 'Περιλαμβάνεται',
|
'native.plans.included': 'Περιλαμβάνεται',
|
||||||
'native.plans.planned': 'Προγραμματίζεται',
|
|
||||||
'native.plans.assistant': 'Βοηθός AI',
|
'native.plans.assistant': 'Βοηθός AI',
|
||||||
'native.plans.mailImport': 'Αυτόματη εισαγωγή email',
|
'native.plans.mailImport': 'Αυτόματη εισαγωγή email',
|
||||||
'native.plans.aiLabel': 'Έγγραφα AI',
|
'native.plans.aiLabel': 'Έγγραφα AI',
|
||||||
'native.plans.choose': 'Επιλογή: {trip}',
|
'native.plans.choose': 'Επιλογή: {plan}',
|
||||||
'native.plans.termsShort': 'Όροι χρήσης (EULA)',
|
'native.plans.termsShort': 'Όροι χρήσης (EULA)',
|
||||||
'native.plans.privacyShort': 'Απόρρητο',
|
'native.plans.privacyShort': 'Απόρρητο',
|
||||||
'native.plans.billing': 'Χρέωση',
|
'native.plans.billing': 'Χρέωση',
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
import type { TranslationStrings } from '../types';
|
import type { TranslationStrings } from '../types';
|
||||||
|
|
||||||
const native: TranslationStrings = {
|
const native: TranslationStrings = {
|
||||||
|
'native.trial.cancelApple': 'כדי להימנע מחיוב, בטלו ב-App Store לפחות 24 שעות לפני סיום תקופת הניסיון.',
|
||||||
|
'native.trial.cancelPlay': 'כדי להימנע מחיוב, בטלו ב-Google Play לפני סיום תקופת הניסיון.',
|
||||||
|
'native.trial.badge': '7 ימים בחינם',
|
||||||
|
'native.trial.price': '7 ימים בחינם, ולאחר מכן {price} {period}.',
|
||||||
|
'native.trial.changed': 'המבצע השתנה. חזרו למסלולים ובדקו את המחיר העדכני.',
|
||||||
'native.connect.title': 'התחברות ל-TREK',
|
'native.connect.title': 'התחברות ל-TREK',
|
||||||
'native.connect.hint': 'הזינו את הכתובת שבה אתם פותחים את TREK בדפדפן.',
|
'native.connect.hint': 'הזינו את הכתובת שבה אתם פותחים את TREK בדפדפן.',
|
||||||
'native.connect.placeholder': 'https://trek.example.com',
|
'native.connect.placeholder': 'https://trek.example.com',
|
||||||
@@ -64,7 +69,6 @@ const native: TranslationStrings = {
|
|||||||
'native.plans.legalAndroid':
|
'native.plans.legalAndroid':
|
||||||
'התשלום יחויב בחשבון Google שלכם עם האישור. המינוי מתחדש אוטומטית אלא אם תבטלו אותו לפני סוף התקופה. אפשר לנהל או לבטל אותו ב-Google Play תחת פרופיל, תשלומים ומינויים, מינויים.',
|
'התשלום יחויב בחשבון Google שלכם עם האישור. המינוי מתחדש אוטומטית אלא אם תבטלו אותו לפני סוף התקופה. אפשר לנהל או לבטל אותו ב-Google Play תחת פרופיל, תשלומים ומינויים, מינויים.',
|
||||||
'native.plans.restoreNoneAndroid': 'לא נמצא מינוי פעיל בחשבון Google הזה.',
|
'native.plans.restoreNoneAndroid': 'לא נמצא מינוי פעיל בחשבון Google הזה.',
|
||||||
'native.plans.recommended': 'מומלץ',
|
|
||||||
'native.claim.change': 'שינוי',
|
'native.claim.change': 'שינוי',
|
||||||
'native.claim.ruleLength': 'תווים',
|
'native.claim.ruleLength': 'תווים',
|
||||||
'native.claim.ruleUpper': 'אות גדולה',
|
'native.claim.ruleUpper': 'אות גדולה',
|
||||||
@@ -187,28 +191,17 @@ const native: TranslationStrings = {
|
|||||||
'native.welcome.photosTitle': 'תמונות ואלבום',
|
'native.welcome.photosTitle': 'תמונות ואלבום',
|
||||||
'native.welcome.photosSub': 'הזיכרונות נשארים עם הטיול',
|
'native.welcome.photosSub': 'הזיכרונות נשארים עם הטיול',
|
||||||
'native.welcome.discover': 'גלו את חבילות הענן',
|
'native.welcome.discover': 'גלו את חבילות הענן',
|
||||||
'native.trip.start.title': 'סוף שבוע',
|
|
||||||
'native.trip.start.text': 'טיולים קצרים, בעיקר תכנון.',
|
|
||||||
'native.trip.basis.title': 'טיול מעגלי',
|
|
||||||
'native.trip.basis.text': 'כמה תחנות, הזמנות אוטומטיות.',
|
|
||||||
'native.trip.plus.title': 'מסע גדול',
|
|
||||||
'native.trip.plus.text': 'שבועות בדרכים, עם כל הקבוצה.',
|
|
||||||
'native.trip.pro.title': 'נווד עולמי',
|
|
||||||
'native.trip.pro.text': 'למי שנוסע הרבה ולאלבומים גדולים.',
|
|
||||||
'native.plans.unlimited': 'ללא הגבלה',
|
'native.plans.unlimited': 'ללא הגבלה',
|
||||||
'native.plans.unlimitedSub': 'טיולים ושותפים לדרך',
|
'native.plans.unlimitedSub': 'טיולים ושותפים לדרך',
|
||||||
'native.plans.inEveryPlan': 'בכל חבילה',
|
|
||||||
'native.plans.yearlyIs': '{price} לשנה, ביטול בכל עת',
|
'native.plans.yearlyIs': '{price} לשנה, ביטול בכל עת',
|
||||||
'native.plans.monthlyIs': 'כלומר {price} לחודש',
|
'native.plans.monthlyIs': 'כלומר {price} לחודש',
|
||||||
'native.plans.storageFairUse': 'אחסון בשימוש הוגן',
|
'native.plans.storage': 'אחסון',
|
||||||
'native.plans.aiPerMonth': '{n} / חודש',
|
'native.plans.notIncluded': 'לא כלול',
|
||||||
'native.plans.aiNone': 'לא כלול',
|
|
||||||
'native.plans.included': 'כלול',
|
'native.plans.included': 'כלול',
|
||||||
'native.plans.planned': 'מתוכנן',
|
|
||||||
'native.plans.assistant': 'עוזר AI',
|
'native.plans.assistant': 'עוזר AI',
|
||||||
'native.plans.mailImport': 'ייבוא דוא״ל אוטומטי',
|
'native.plans.mailImport': 'ייבוא דוא״ל אוטומטי',
|
||||||
'native.plans.aiLabel': 'מסמכי AI',
|
'native.plans.aiLabel': 'מסמכי AI',
|
||||||
'native.plans.choose': 'בחירת {trip}',
|
'native.plans.choose': 'בחירת {plan}',
|
||||||
'native.plans.termsShort': 'תנאי שימוש (EULA)',
|
'native.plans.termsShort': 'תנאי שימוש (EULA)',
|
||||||
'native.plans.privacyShort': 'פרטיות',
|
'native.plans.privacyShort': 'פרטיות',
|
||||||
'native.plans.billing': 'חיוב',
|
'native.plans.billing': 'חיוב',
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
import type { TranslationStrings } from '../types';
|
import type { TranslationStrings } from '../types';
|
||||||
|
|
||||||
const native: TranslationStrings = {
|
const native: TranslationStrings = {
|
||||||
|
'native.trial.cancelApple': 'A díj elkerüléséhez mondd le az App Store-ban legalább 24 órával a próbaidő vége előtt.',
|
||||||
|
'native.trial.cancelPlay': 'A díj elkerüléséhez mondd le a Google Playen a próbaidő vége előtt.',
|
||||||
|
'native.trial.badge': '7 nap ingyen',
|
||||||
|
'native.trial.price': '7 nap ingyen, utána {price} {period}.',
|
||||||
|
'native.trial.changed': 'Az ajánlat megváltozott. Térj vissza a csomagokhoz, és ellenőrizd az aktuális árat.',
|
||||||
'native.connect.title': 'Csatlakozás a TREK-hez',
|
'native.connect.title': 'Csatlakozás a TREK-hez',
|
||||||
'native.connect.hint': 'Add meg azt a címet, amelyen a böngésződben megnyitod a TREK-et.',
|
'native.connect.hint': 'Add meg azt a címet, amelyen a böngésződben megnyitod a TREK-et.',
|
||||||
'native.connect.placeholder': 'https://trek.example.com',
|
'native.connect.placeholder': 'https://trek.example.com',
|
||||||
@@ -67,7 +72,6 @@ const native: TranslationStrings = {
|
|||||||
'native.plans.legalAndroid':
|
'native.plans.legalAndroid':
|
||||||
'A díjat a megerősítéskor a Google-fiókodra terheljük. Az előfizetés automatikusan megújul, ha nem mondod le az időszak vége előtt. Kezelni vagy lemondani a Google Playben tudod: Profil, Fizetések és előfizetések, Előfizetések.',
|
'A díjat a megerősítéskor a Google-fiókodra terheljük. Az előfizetés automatikusan megújul, ha nem mondod le az időszak vége előtt. Kezelni vagy lemondani a Google Playben tudod: Profil, Fizetések és előfizetések, Előfizetések.',
|
||||||
'native.plans.restoreNoneAndroid': 'Ehhez a Google-fiókhoz nem található aktív előfizetés.',
|
'native.plans.restoreNoneAndroid': 'Ehhez a Google-fiókhoz nem található aktív előfizetés.',
|
||||||
'native.plans.recommended': 'Ajánlott',
|
|
||||||
'native.claim.change': 'Módosítás',
|
'native.claim.change': 'Módosítás',
|
||||||
'native.claim.ruleLength': 'karakter',
|
'native.claim.ruleLength': 'karakter',
|
||||||
'native.claim.ruleUpper': 'Nagybetű',
|
'native.claim.ruleUpper': 'Nagybetű',
|
||||||
@@ -197,28 +201,17 @@ const native: TranslationStrings = {
|
|||||||
'native.welcome.photosTitle': 'Fotók és fotókönyv',
|
'native.welcome.photosTitle': 'Fotók és fotókönyv',
|
||||||
'native.welcome.photosSub': 'Az emlékek az utazásnál maradnak',
|
'native.welcome.photosSub': 'Az emlékek az utazásnál maradnak',
|
||||||
'native.welcome.discover': 'Felhőcsomagok felfedezése',
|
'native.welcome.discover': 'Felhőcsomagok felfedezése',
|
||||||
'native.trip.start.title': 'Hétvégi kiruccanás',
|
|
||||||
'native.trip.start.text': 'Rövid utak, főleg tervezés.',
|
|
||||||
'native.trip.basis.title': 'Körutazás',
|
|
||||||
'native.trip.basis.text': 'Több állomás, foglalások automatikusan.',
|
|
||||||
'native.trip.plus.title': 'Nagy utazás',
|
|
||||||
'native.trip.plus.text': 'Hetekig úton, az egész csapattal.',
|
|
||||||
'native.trip.pro.title': 'Világjáró',
|
|
||||||
'native.trip.pro.text': 'Gyakori utazóknak és nagy fotókönyvekhez.',
|
|
||||||
'native.plans.unlimited': 'Korlátlan',
|
'native.plans.unlimited': 'Korlátlan',
|
||||||
'native.plans.unlimitedSub': 'Utazások és útitársak',
|
'native.plans.unlimitedSub': 'Utazások és útitársak',
|
||||||
'native.plans.inEveryPlan': 'minden csomagban',
|
|
||||||
'native.plans.yearlyIs': 'Évente {price}, bármikor lemondható',
|
'native.plans.yearlyIs': 'Évente {price}, bármikor lemondható',
|
||||||
'native.plans.monthlyIs': 'Ez havonta {price}',
|
'native.plans.monthlyIs': 'Ez havonta {price}',
|
||||||
'native.plans.storageFairUse': 'Tárhely méltányos használatra',
|
'native.plans.storage': 'Tárhely',
|
||||||
'native.plans.aiPerMonth': '{n} / hó',
|
'native.plans.notIncluded': 'Nem tartalmazza',
|
||||||
'native.plans.aiNone': 'Nem tartalmazza',
|
|
||||||
'native.plans.included': 'Tartalmazza',
|
'native.plans.included': 'Tartalmazza',
|
||||||
'native.plans.planned': 'Tervezett',
|
|
||||||
'native.plans.assistant': 'MI-asszisztens',
|
'native.plans.assistant': 'MI-asszisztens',
|
||||||
'native.plans.mailImport': 'Automatikus e-mail-importálás',
|
'native.plans.mailImport': 'Automatikus e-mail-importálás',
|
||||||
'native.plans.aiLabel': 'MI-dokumentumok',
|
'native.plans.aiLabel': 'MI-dokumentumok',
|
||||||
'native.plans.choose': '{trip} választása',
|
'native.plans.choose': '{plan} választása',
|
||||||
'native.plans.termsShort': 'Felhasználási feltételek (EULA)',
|
'native.plans.termsShort': 'Felhasználási feltételek (EULA)',
|
||||||
'native.plans.privacyShort': 'Adatvédelem',
|
'native.plans.privacyShort': 'Adatvédelem',
|
||||||
'native.plans.billing': 'Fizetés',
|
'native.plans.billing': 'Fizetés',
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
import type { TranslationStrings } from '../types';
|
import type { TranslationStrings } from '../types';
|
||||||
|
|
||||||
const native: TranslationStrings = {
|
const native: TranslationStrings = {
|
||||||
|
'native.trial.cancelApple':
|
||||||
|
'Untuk menghindari tagihan, batalkan di App Store setidaknya 24 jam sebelum masa uji coba berakhir.',
|
||||||
|
'native.trial.cancelPlay': 'Untuk menghindari tagihan, batalkan di Google Play sebelum masa uji coba berakhir.',
|
||||||
|
'native.trial.badge': 'Gratis 7 hari',
|
||||||
|
'native.trial.price': 'Gratis 7 hari, lalu {price} {period}.',
|
||||||
|
'native.trial.changed': 'Penawaran telah berubah. Kembali ke daftar paket dan periksa harga saat ini.',
|
||||||
'native.connect.title': 'Hubungkan ke TREK',
|
'native.connect.title': 'Hubungkan ke TREK',
|
||||||
'native.connect.hint': 'Masukkan alamat yang kamu gunakan untuk membuka TREK di browser.',
|
'native.connect.hint': 'Masukkan alamat yang kamu gunakan untuk membuka TREK di browser.',
|
||||||
'native.connect.placeholder': 'https://trek.example.com',
|
'native.connect.placeholder': 'https://trek.example.com',
|
||||||
@@ -66,7 +72,6 @@ const native: TranslationStrings = {
|
|||||||
'native.plans.legalAndroid':
|
'native.plans.legalAndroid':
|
||||||
'Pembayaran ditagihkan ke akun Google Anda saat konfirmasi. Langganan diperpanjang otomatis kecuali Anda membatalkannya sebelum periode berakhir. Kelola atau batalkan di Google Play pada Profil, Pembayaran & langganan, Langganan.',
|
'Pembayaran ditagihkan ke akun Google Anda saat konfirmasi. Langganan diperpanjang otomatis kecuali Anda membatalkannya sebelum periode berakhir. Kelola atau batalkan di Google Play pada Profil, Pembayaran & langganan, Langganan.',
|
||||||
'native.plans.restoreNoneAndroid': 'Tidak ditemukan langganan aktif di akun Google ini.',
|
'native.plans.restoreNoneAndroid': 'Tidak ditemukan langganan aktif di akun Google ini.',
|
||||||
'native.plans.recommended': 'Disarankan',
|
|
||||||
'native.claim.change': 'Ubah',
|
'native.claim.change': 'Ubah',
|
||||||
'native.claim.ruleLength': 'karakter',
|
'native.claim.ruleLength': 'karakter',
|
||||||
'native.claim.ruleUpper': 'Huruf besar',
|
'native.claim.ruleUpper': 'Huruf besar',
|
||||||
@@ -196,28 +201,17 @@ const native: TranslationStrings = {
|
|||||||
'native.welcome.photosTitle': 'Foto dan buku foto',
|
'native.welcome.photosTitle': 'Foto dan buku foto',
|
||||||
'native.welcome.photosSub': 'Kenangan tetap bersama perjalanan',
|
'native.welcome.photosSub': 'Kenangan tetap bersama perjalanan',
|
||||||
'native.welcome.discover': 'Lihat paket cloud',
|
'native.welcome.discover': 'Lihat paket cloud',
|
||||||
'native.trip.start.title': 'Liburan akhir pekan',
|
|
||||||
'native.trip.start.text': 'Perjalanan singkat, terutama merencanakan.',
|
|
||||||
'native.trip.basis.title': 'Perjalanan keliling',
|
|
||||||
'native.trip.basis.text': 'Beberapa tempat, pemesanan otomatis.',
|
|
||||||
'native.trip.plus.title': 'Perjalanan besar',
|
|
||||||
'native.trip.plus.text': 'Berminggu-minggu di jalan, bersama seluruh rombongan.',
|
|
||||||
'native.trip.pro.title': 'Penjelajah dunia',
|
|
||||||
'native.trip.pro.text': 'Untuk yang sering bepergian dan buku foto besar.',
|
|
||||||
'native.plans.unlimited': 'Tanpa batas',
|
'native.plans.unlimited': 'Tanpa batas',
|
||||||
'native.plans.unlimitedSub': 'Perjalanan dan teman perjalanan',
|
'native.plans.unlimitedSub': 'Perjalanan dan teman perjalanan',
|
||||||
'native.plans.inEveryPlan': 'di setiap paket',
|
|
||||||
'native.plans.yearlyIs': '{price} per tahun, batalkan kapan saja',
|
'native.plans.yearlyIs': '{price} per tahun, batalkan kapan saja',
|
||||||
'native.plans.monthlyIs': 'Itu {price} per bulan',
|
'native.plans.monthlyIs': 'Itu {price} per bulan',
|
||||||
'native.plans.storageFairUse': 'Penyimpanan penggunaan wajar',
|
'native.plans.storage': 'Penyimpanan',
|
||||||
'native.plans.aiPerMonth': '{n} / bulan',
|
'native.plans.notIncluded': 'Tidak disertakan',
|
||||||
'native.plans.aiNone': 'Tidak disertakan',
|
|
||||||
'native.plans.included': 'Disertakan',
|
'native.plans.included': 'Disertakan',
|
||||||
'native.plans.planned': 'Direncanakan',
|
|
||||||
'native.plans.assistant': 'Asisten AI',
|
'native.plans.assistant': 'Asisten AI',
|
||||||
'native.plans.mailImport': 'Impor email otomatis',
|
'native.plans.mailImport': 'Impor email otomatis',
|
||||||
'native.plans.aiLabel': 'Dokumen AI',
|
'native.plans.aiLabel': 'Dokumen AI',
|
||||||
'native.plans.choose': 'Pilih {trip}',
|
'native.plans.choose': 'Pilih {plan}',
|
||||||
'native.plans.termsShort': 'Ketentuan Penggunaan (EULA)',
|
'native.plans.termsShort': 'Ketentuan Penggunaan (EULA)',
|
||||||
'native.plans.privacyShort': 'Privasi',
|
'native.plans.privacyShort': 'Privasi',
|
||||||
'native.plans.billing': 'Pembayaran',
|
'native.plans.billing': 'Pembayaran',
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
import type { TranslationStrings } from '../types';
|
import type { TranslationStrings } from '../types';
|
||||||
|
|
||||||
const native: TranslationStrings = {
|
const native: TranslationStrings = {
|
||||||
|
'native.trial.cancelApple':
|
||||||
|
'Per evitare l’addebito, annulla su App Store almeno 24 ore prima della fine della prova.',
|
||||||
|
'native.trial.cancelPlay': 'Per evitare l’addebito, annulla su Google Play prima della fine della prova.',
|
||||||
|
'native.trial.badge': '7 giorni gratis',
|
||||||
|
'native.trial.price': '7 giorni gratis, poi {price} {period}.',
|
||||||
|
'native.trial.changed': 'L’offerta è cambiata. Torna ai piani e controlla il prezzo attuale.',
|
||||||
'native.connect.title': 'Connetti a TREK',
|
'native.connect.title': 'Connetti a TREK',
|
||||||
'native.connect.hint': 'Inserisci l’indirizzo con cui apri TREK nel browser.',
|
'native.connect.hint': 'Inserisci l’indirizzo con cui apri TREK nel browser.',
|
||||||
'native.connect.placeholder': 'https://trek.example.com',
|
'native.connect.placeholder': 'https://trek.example.com',
|
||||||
@@ -67,7 +73,6 @@ const native: TranslationStrings = {
|
|||||||
'native.plans.legalAndroid':
|
'native.plans.legalAndroid':
|
||||||
'Il pagamento viene addebitato sul tuo account Google alla conferma. L’abbonamento si rinnova automaticamente se non lo annulli prima della fine del periodo. Gestiscilo o annullalo in Google Play da Profilo, Pagamenti e abbonamenti, Abbonamenti.',
|
'Il pagamento viene addebitato sul tuo account Google alla conferma. L’abbonamento si rinnova automaticamente se non lo annulli prima della fine del periodo. Gestiscilo o annullalo in Google Play da Profilo, Pagamenti e abbonamenti, Abbonamenti.',
|
||||||
'native.plans.restoreNoneAndroid': 'Nessun abbonamento attivo trovato per questo account Google.',
|
'native.plans.restoreNoneAndroid': 'Nessun abbonamento attivo trovato per questo account Google.',
|
||||||
'native.plans.recommended': 'Consigliato',
|
|
||||||
'native.claim.change': 'Cambia',
|
'native.claim.change': 'Cambia',
|
||||||
'native.claim.ruleLength': 'caratteri',
|
'native.claim.ruleLength': 'caratteri',
|
||||||
'native.claim.ruleUpper': 'Maiuscola',
|
'native.claim.ruleUpper': 'Maiuscola',
|
||||||
@@ -198,28 +203,17 @@ const native: TranslationStrings = {
|
|||||||
'native.welcome.photosTitle': 'Foto e fotolibro',
|
'native.welcome.photosTitle': 'Foto e fotolibro',
|
||||||
'native.welcome.photosSub': 'I ricordi restano con il viaggio',
|
'native.welcome.photosSub': 'I ricordi restano con il viaggio',
|
||||||
'native.welcome.discover': 'Scopri i piani cloud',
|
'native.welcome.discover': 'Scopri i piani cloud',
|
||||||
'native.trip.start.title': 'Weekend',
|
|
||||||
'native.trip.start.text': 'Viaggi brevi, soprattutto da pianificare.',
|
|
||||||
'native.trip.basis.title': 'Tour',
|
|
||||||
'native.trip.basis.text': 'Più tappe, prenotazioni automatiche.',
|
|
||||||
'native.trip.plus.title': 'Grande viaggio',
|
|
||||||
'native.trip.plus.text': 'Settimane in viaggio, con tutto il gruppo.',
|
|
||||||
'native.trip.pro.title': 'Giramondo',
|
|
||||||
'native.trip.pro.text': 'Per chi viaggia spesso e per grandi fotolibri.',
|
|
||||||
'native.plans.unlimited': 'Illimitati',
|
'native.plans.unlimited': 'Illimitati',
|
||||||
'native.plans.unlimitedSub': 'Viaggi e compagni di viaggio',
|
'native.plans.unlimitedSub': 'Viaggi e compagni di viaggio',
|
||||||
'native.plans.inEveryPlan': 'in ogni piano',
|
|
||||||
'native.plans.yearlyIs': '{price} all’anno, disdici quando vuoi',
|
'native.plans.yearlyIs': '{price} all’anno, disdici quando vuoi',
|
||||||
'native.plans.monthlyIs': 'Sono {price} al mese',
|
'native.plans.monthlyIs': 'Sono {price} al mese',
|
||||||
'native.plans.storageFairUse': 'Spazio con uso ragionevole',
|
'native.plans.storage': 'Archiviazione',
|
||||||
'native.plans.aiPerMonth': '{n} / mese',
|
'native.plans.notIncluded': 'Non incluso',
|
||||||
'native.plans.aiNone': 'Non incluso',
|
|
||||||
'native.plans.included': 'Incluso',
|
'native.plans.included': 'Incluso',
|
||||||
'native.plans.planned': 'Previsto',
|
|
||||||
'native.plans.assistant': 'Assistente IA',
|
'native.plans.assistant': 'Assistente IA',
|
||||||
'native.plans.mailImport': 'Importazione automatica delle e-mail',
|
'native.plans.mailImport': 'Importazione automatica delle e-mail',
|
||||||
'native.plans.aiLabel': 'Documenti IA',
|
'native.plans.aiLabel': 'Documenti IA',
|
||||||
'native.plans.choose': 'Scegli {trip}',
|
'native.plans.choose': 'Scegli {plan}',
|
||||||
'native.plans.termsShort': 'Condizioni d’uso (EULA)',
|
'native.plans.termsShort': 'Condizioni d’uso (EULA)',
|
||||||
'native.plans.privacyShort': 'Privacy', // same-as-en
|
'native.plans.privacyShort': 'Privacy', // same-as-en
|
||||||
'native.plans.billing': 'Fatturazione',
|
'native.plans.billing': 'Fatturazione',
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
import type { TranslationStrings } from '../types';
|
import type { TranslationStrings } from '../types';
|
||||||
|
|
||||||
const native: TranslationStrings = {
|
const native: TranslationStrings = {
|
||||||
|
'native.trial.cancelApple': '請求を避けるには、無料期間が終わる24時間以上前にApp Storeで解約してください。',
|
||||||
|
'native.trial.cancelPlay': '請求を避けるには、無料期間が終わる前にGoogle Playで解約してください。',
|
||||||
|
'native.trial.badge': '7日間無料',
|
||||||
|
'native.trial.price': '7日間無料。その後は{period}{price}です。',
|
||||||
|
'native.trial.changed': 'オファーが変更されました。プラン一覧に戻り、現在の料金をご確認ください。',
|
||||||
'native.connect.title': 'TREK に接続',
|
'native.connect.title': 'TREK に接続',
|
||||||
'native.connect.hint': 'ブラウザで TREK を開くときのアドレスを入力してください。',
|
'native.connect.hint': 'ブラウザで TREK を開くときのアドレスを入力してください。',
|
||||||
'native.connect.placeholder': 'https://trek.example.com',
|
'native.connect.placeholder': 'https://trek.example.com',
|
||||||
@@ -65,7 +70,6 @@ const native: TranslationStrings = {
|
|||||||
'native.plans.legalAndroid':
|
'native.plans.legalAndroid':
|
||||||
'確認時に Google アカウントに請求されます。期間終了前に解約しない限り、サブスクリプションは自動更新されます。Google Play の[プロフィール][お支払いと定期購入][定期購入]で管理または解約できます。',
|
'確認時に Google アカウントに請求されます。期間終了前に解約しない限り、サブスクリプションは自動更新されます。Google Play の[プロフィール][お支払いと定期購入][定期購入]で管理または解約できます。',
|
||||||
'native.plans.restoreNoneAndroid': 'この Google アカウントには有効なサブスクリプションがありません。',
|
'native.plans.restoreNoneAndroid': 'この Google アカウントには有効なサブスクリプションがありません。',
|
||||||
'native.plans.recommended': 'おすすめ',
|
|
||||||
'native.claim.change': '変更',
|
'native.claim.change': '変更',
|
||||||
'native.claim.ruleLength': '文字',
|
'native.claim.ruleLength': '文字',
|
||||||
'native.claim.ruleUpper': '大文字',
|
'native.claim.ruleUpper': '大文字',
|
||||||
@@ -193,28 +197,17 @@ const native: TranslationStrings = {
|
|||||||
'native.welcome.photosTitle': '写真とフォトブック',
|
'native.welcome.photosTitle': '写真とフォトブック',
|
||||||
'native.welcome.photosSub': '思い出は旅と一緒に残ります',
|
'native.welcome.photosSub': '思い出は旅と一緒に残ります',
|
||||||
'native.welcome.discover': 'クラウドプランを見る',
|
'native.welcome.discover': 'クラウドプランを見る',
|
||||||
'native.trip.start.title': '週末旅行',
|
|
||||||
'native.trip.start.text': '短い旅、計画が中心。',
|
|
||||||
'native.trip.basis.title': '周遊旅行',
|
|
||||||
'native.trip.basis.text': '複数の目的地、予約は自動で。',
|
|
||||||
'native.trip.plus.title': '大旅行',
|
|
||||||
'native.trip.plus.text': '何週間もの旅を、グループ全員で。',
|
|
||||||
'native.trip.pro.title': '世界旅行者',
|
|
||||||
'native.trip.pro.text': 'よく旅する人と大きなフォトブックに。',
|
|
||||||
'native.plans.unlimited': '無制限',
|
'native.plans.unlimited': '無制限',
|
||||||
'native.plans.unlimitedSub': '旅行と同行者',
|
'native.plans.unlimitedSub': '旅行と同行者',
|
||||||
'native.plans.inEveryPlan': 'すべてのプランで',
|
|
||||||
'native.plans.yearlyIs': '年額 {price}、いつでも解約可能',
|
'native.plans.yearlyIs': '年額 {price}、いつでも解約可能',
|
||||||
'native.plans.monthlyIs': '月あたり {price}',
|
'native.plans.monthlyIs': '月あたり {price}',
|
||||||
'native.plans.storageFairUse': 'ストレージの公平利用枠',
|
'native.plans.storage': 'ストレージ',
|
||||||
'native.plans.aiPerMonth': '{n} / 月',
|
'native.plans.notIncluded': '対象外',
|
||||||
'native.plans.aiNone': '対象外',
|
|
||||||
'native.plans.included': '利用可能',
|
'native.plans.included': '利用可能',
|
||||||
'native.plans.planned': '提供予定',
|
|
||||||
'native.plans.assistant': 'AI アシスタント',
|
'native.plans.assistant': 'AI アシスタント',
|
||||||
'native.plans.mailImport': 'メールの自動取り込み',
|
'native.plans.mailImport': 'メールの自動取り込み',
|
||||||
'native.plans.aiLabel': 'AI ドキュメント',
|
'native.plans.aiLabel': 'AI ドキュメント',
|
||||||
'native.plans.choose': '{trip}を選ぶ',
|
'native.plans.choose': '{plan}を選ぶ',
|
||||||
'native.plans.termsShort': '利用規約 (EULA)',
|
'native.plans.termsShort': '利用規約 (EULA)',
|
||||||
'native.plans.privacyShort': 'プライバシー',
|
'native.plans.privacyShort': 'プライバシー',
|
||||||
'native.plans.billing': 'お支払い',
|
'native.plans.billing': 'お支払い',
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
import type { TranslationStrings } from '../types';
|
import type { TranslationStrings } from '../types';
|
||||||
|
|
||||||
const native: TranslationStrings = {
|
const native: TranslationStrings = {
|
||||||
|
'native.trial.cancelApple': '요금이 청구되지 않으려면 체험 종료 최소 24시간 전에 App Store에서 구독을 취소하세요.',
|
||||||
|
'native.trial.cancelPlay': '요금이 청구되지 않으려면 체험 종료 전에 Google Play에서 구독을 취소하세요.',
|
||||||
|
'native.trial.badge': '7일 무료',
|
||||||
|
'native.trial.price': '7일 무료 이용 후 {period} {price}가 청구됩니다.',
|
||||||
|
'native.trial.changed': '혜택이 변경되었습니다. 요금제 목록으로 돌아가 현재 요금을 확인하세요.',
|
||||||
'native.connect.title': 'TREK에 연결',
|
'native.connect.title': 'TREK에 연결',
|
||||||
'native.connect.hint': '브라우저에서 TREK을 여는 주소를 입력하세요.',
|
'native.connect.hint': '브라우저에서 TREK을 여는 주소를 입력하세요.',
|
||||||
'native.connect.placeholder': 'https://trek.example.com',
|
'native.connect.placeholder': 'https://trek.example.com',
|
||||||
@@ -63,7 +68,6 @@ const native: TranslationStrings = {
|
|||||||
'native.plans.legalAndroid':
|
'native.plans.legalAndroid':
|
||||||
'확인 시 Google 계정으로 결제됩니다. 기간이 끝나기 전에 취소하지 않으면 구독이 자동으로 갱신됩니다. Google Play의 프로필, 결제 및 정기 결제, 정기 결제에서 관리하거나 취소할 수 있습니다.',
|
'확인 시 Google 계정으로 결제됩니다. 기간이 끝나기 전에 취소하지 않으면 구독이 자동으로 갱신됩니다. Google Play의 프로필, 결제 및 정기 결제, 정기 결제에서 관리하거나 취소할 수 있습니다.',
|
||||||
'native.plans.restoreNoneAndroid': '이 Google 계정에서 활성 구독을 찾을 수 없습니다.',
|
'native.plans.restoreNoneAndroid': '이 Google 계정에서 활성 구독을 찾을 수 없습니다.',
|
||||||
'native.plans.recommended': '추천',
|
|
||||||
'native.claim.change': '변경',
|
'native.claim.change': '변경',
|
||||||
'native.claim.ruleLength': '자',
|
'native.claim.ruleLength': '자',
|
||||||
'native.claim.ruleUpper': '대문자',
|
'native.claim.ruleUpper': '대문자',
|
||||||
@@ -190,28 +194,17 @@ const native: TranslationStrings = {
|
|||||||
'native.welcome.photosTitle': '사진과 포토북',
|
'native.welcome.photosTitle': '사진과 포토북',
|
||||||
'native.welcome.photosSub': '추억은 여행과 함께 남습니다',
|
'native.welcome.photosSub': '추억은 여행과 함께 남습니다',
|
||||||
'native.welcome.discover': '클라우드 요금제 보기',
|
'native.welcome.discover': '클라우드 요금제 보기',
|
||||||
'native.trip.start.title': '주말여행',
|
|
||||||
'native.trip.start.text': '짧은 여행, 주로 계획.',
|
|
||||||
'native.trip.basis.title': '순회 여행',
|
|
||||||
'native.trip.basis.text': '여러 장소, 예약은 자동으로.',
|
|
||||||
'native.trip.plus.title': '긴 여행',
|
|
||||||
'native.trip.plus.text': '몇 주간의 여정, 모든 일행과 함께.',
|
|
||||||
'native.trip.pro.title': '세계 여행자',
|
|
||||||
'native.trip.pro.text': '자주 여행하는 분과 큰 포토북을 위해.',
|
|
||||||
'native.plans.unlimited': '무제한',
|
'native.plans.unlimited': '무제한',
|
||||||
'native.plans.unlimitedSub': '여행과 동행자',
|
'native.plans.unlimitedSub': '여행과 동행자',
|
||||||
'native.plans.inEveryPlan': '모든 요금제에 포함',
|
|
||||||
'native.plans.yearlyIs': '연 {price}, 언제든 해지',
|
'native.plans.yearlyIs': '연 {price}, 언제든 해지',
|
||||||
'native.plans.monthlyIs': '월 {price}에 해당',
|
'native.plans.monthlyIs': '월 {price}에 해당',
|
||||||
'native.plans.storageFairUse': '공정 사용 저장 공간',
|
'native.plans.storage': '스토리지',
|
||||||
'native.plans.aiPerMonth': '{n} / 월',
|
'native.plans.notIncluded': '미포함',
|
||||||
'native.plans.aiNone': '미포함',
|
|
||||||
'native.plans.included': '포함',
|
'native.plans.included': '포함',
|
||||||
'native.plans.planned': '예정',
|
|
||||||
'native.plans.assistant': 'AI 어시스턴트',
|
'native.plans.assistant': 'AI 어시스턴트',
|
||||||
'native.plans.mailImport': '자동 이메일 가져오기',
|
'native.plans.mailImport': '자동 이메일 가져오기',
|
||||||
'native.plans.aiLabel': 'AI 문서',
|
'native.plans.aiLabel': 'AI 문서',
|
||||||
'native.plans.choose': '{trip} 선택',
|
'native.plans.choose': '{plan} 선택',
|
||||||
'native.plans.termsShort': '이용 약관 (EULA)',
|
'native.plans.termsShort': '이용 약관 (EULA)',
|
||||||
'native.plans.privacyShort': '개인정보',
|
'native.plans.privacyShort': '개인정보',
|
||||||
'native.plans.billing': '결제',
|
'native.plans.billing': '결제',
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
import type { TranslationStrings } from '../types';
|
import type { TranslationStrings } from '../types';
|
||||||
|
|
||||||
const native: TranslationStrings = {
|
const native: TranslationStrings = {
|
||||||
|
'native.trial.cancelApple':
|
||||||
|
'Wil je kosten voorkomen, zeg dan minstens 24 uur voor het einde van de proefperiode op in de App Store.',
|
||||||
|
'native.trial.cancelPlay': 'Wil je kosten voorkomen, zeg dan vóór het einde van de proefperiode op in Google Play.',
|
||||||
|
'native.trial.badge': '7 dagen gratis',
|
||||||
|
'native.trial.price': '7 dagen gratis, daarna {price} {period}.',
|
||||||
|
'native.trial.changed': 'Het aanbod is gewijzigd. Ga terug naar de abonnementen en controleer de huidige prijs.',
|
||||||
'native.connect.title': 'Verbinden met TREK',
|
'native.connect.title': 'Verbinden met TREK',
|
||||||
'native.connect.hint': 'Voer het adres in waarop je TREK in je browser opent.',
|
'native.connect.hint': 'Voer het adres in waarop je TREK in je browser opent.',
|
||||||
'native.connect.placeholder': 'https://trek.example.com',
|
'native.connect.placeholder': 'https://trek.example.com',
|
||||||
@@ -66,7 +72,6 @@ const native: TranslationStrings = {
|
|||||||
'native.plans.legalAndroid':
|
'native.plans.legalAndroid':
|
||||||
'De betaling wordt bij bevestiging via je Google-account in rekening gebracht. Het abonnement wordt automatisch verlengd, tenzij je het vóór het einde van de periode opzegt. Beheer of zeg het op in Google Play onder Profiel, Betalingen en abonnementen, Abonnementen.',
|
'De betaling wordt bij bevestiging via je Google-account in rekening gebracht. Het abonnement wordt automatisch verlengd, tenzij je het vóór het einde van de periode opzegt. Beheer of zeg het op in Google Play onder Profiel, Betalingen en abonnementen, Abonnementen.',
|
||||||
'native.plans.restoreNoneAndroid': 'Geen actief abonnement gevonden voor dit Google-account.',
|
'native.plans.restoreNoneAndroid': 'Geen actief abonnement gevonden voor dit Google-account.',
|
||||||
'native.plans.recommended': 'Aanbevolen',
|
|
||||||
'native.claim.change': 'Wijzigen',
|
'native.claim.change': 'Wijzigen',
|
||||||
'native.claim.ruleLength': 'tekens',
|
'native.claim.ruleLength': 'tekens',
|
||||||
'native.claim.ruleUpper': 'Hoofdletter',
|
'native.claim.ruleUpper': 'Hoofdletter',
|
||||||
@@ -196,28 +201,17 @@ const native: TranslationStrings = {
|
|||||||
'native.welcome.photosTitle': 'Foto’s en fotoboek',
|
'native.welcome.photosTitle': 'Foto’s en fotoboek',
|
||||||
'native.welcome.photosSub': 'De herinneringen blijven bij de reis',
|
'native.welcome.photosSub': 'De herinneringen blijven bij de reis',
|
||||||
'native.welcome.discover': 'Cloudabonnementen bekijken',
|
'native.welcome.discover': 'Cloudabonnementen bekijken',
|
||||||
'native.trip.start.title': 'Weekendje weg',
|
|
||||||
'native.trip.start.text': 'Korte reizen, vooral plannen.',
|
|
||||||
'native.trip.basis.title': 'Rondreis',
|
|
||||||
'native.trip.basis.text': 'Meerdere plekken, boekingen automatisch.',
|
|
||||||
'native.trip.plus.title': 'Grote reis',
|
|
||||||
'native.trip.plus.text': 'Weken onderweg, met de hele groep.',
|
|
||||||
'native.trip.pro.title': 'Wereldreiziger',
|
|
||||||
'native.trip.pro.text': 'Voor veelreizigers en grote fotoboeken.',
|
|
||||||
'native.plans.unlimited': 'Onbeperkt',
|
'native.plans.unlimited': 'Onbeperkt',
|
||||||
'native.plans.unlimitedSub': 'Reizen en medereizigers',
|
'native.plans.unlimitedSub': 'Reizen en medereizigers',
|
||||||
'native.plans.inEveryPlan': 'in elk abonnement',
|
|
||||||
'native.plans.yearlyIs': '{price} per jaar, altijd opzegbaar',
|
'native.plans.yearlyIs': '{price} per jaar, altijd opzegbaar',
|
||||||
'native.plans.monthlyIs': 'Dat is {price} per maand',
|
'native.plans.monthlyIs': 'Dat is {price} per maand',
|
||||||
'native.plans.storageFairUse': 'Opslag bij redelijk gebruik',
|
'native.plans.storage': 'Opslag',
|
||||||
'native.plans.aiPerMonth': '{n} / maand',
|
'native.plans.notIncluded': 'Niet inbegrepen',
|
||||||
'native.plans.aiNone': 'Niet inbegrepen',
|
|
||||||
'native.plans.included': 'Inbegrepen',
|
'native.plans.included': 'Inbegrepen',
|
||||||
'native.plans.planned': 'Gepland',
|
|
||||||
'native.plans.assistant': 'AI-assistent',
|
'native.plans.assistant': 'AI-assistent',
|
||||||
'native.plans.mailImport': 'Automatische e-mailimport',
|
'native.plans.mailImport': 'Automatische e-mailimport',
|
||||||
'native.plans.aiLabel': 'AI-documenten',
|
'native.plans.aiLabel': 'AI-documenten',
|
||||||
'native.plans.choose': '{trip} kiezen',
|
'native.plans.choose': '{plan} kiezen',
|
||||||
'native.plans.termsShort': 'Gebruiksvoorwaarden (EULA)',
|
'native.plans.termsShort': 'Gebruiksvoorwaarden (EULA)',
|
||||||
'native.plans.privacyShort': 'Privacy', // same-as-en
|
'native.plans.privacyShort': 'Privacy', // same-as-en
|
||||||
'native.plans.billing': 'Betaling',
|
'native.plans.billing': 'Betaling',
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
import type { TranslationStrings } from '../types';
|
import type { TranslationStrings } from '../types';
|
||||||
|
|
||||||
const native: TranslationStrings = {
|
const native: TranslationStrings = {
|
||||||
|
'native.trial.cancelApple':
|
||||||
|
'Aby uniknąć opłaty, anuluj w App Store co najmniej 24 godziny przed końcem okresu próbnego.',
|
||||||
|
'native.trial.cancelPlay': 'Aby uniknąć opłaty, anuluj w Google Play przed końcem okresu próbnego.',
|
||||||
|
'native.trial.badge': '7 dni za darmo',
|
||||||
|
'native.trial.price': '7 dni za darmo, potem {price} {period}.',
|
||||||
|
'native.trial.changed': 'Oferta się zmieniła. Wróć do planów i sprawdź aktualną cenę.',
|
||||||
'native.connect.title': 'Połącz z TREK',
|
'native.connect.title': 'Połącz z TREK',
|
||||||
'native.connect.hint': 'Wpisz adres, pod którym otwierasz TREK w przeglądarce.',
|
'native.connect.hint': 'Wpisz adres, pod którym otwierasz TREK w przeglądarce.',
|
||||||
'native.connect.placeholder': 'https://trek.example.com',
|
'native.connect.placeholder': 'https://trek.example.com',
|
||||||
@@ -66,7 +72,6 @@ const native: TranslationStrings = {
|
|||||||
'native.plans.legalAndroid':
|
'native.plans.legalAndroid':
|
||||||
'Płatność zostanie pobrana z Twojego konta Google po potwierdzeniu. Subskrypcja odnawia się automatycznie, jeśli nie anulujesz jej przed końcem okresu. Zarządzaj nią lub ją anuluj w Google Play w sekcji Profil, Płatności i subskrypcje, Subskrypcje.',
|
'Płatność zostanie pobrana z Twojego konta Google po potwierdzeniu. Subskrypcja odnawia się automatycznie, jeśli nie anulujesz jej przed końcem okresu. Zarządzaj nią lub ją anuluj w Google Play w sekcji Profil, Płatności i subskrypcje, Subskrypcje.',
|
||||||
'native.plans.restoreNoneAndroid': 'Nie znaleziono aktywnej subskrypcji na tym koncie Google.',
|
'native.plans.restoreNoneAndroid': 'Nie znaleziono aktywnej subskrypcji na tym koncie Google.',
|
||||||
'native.plans.recommended': 'Polecany',
|
|
||||||
'native.claim.change': 'Zmień',
|
'native.claim.change': 'Zmień',
|
||||||
'native.claim.ruleLength': 'znaków',
|
'native.claim.ruleLength': 'znaków',
|
||||||
'native.claim.ruleUpper': 'Wielka litera',
|
'native.claim.ruleUpper': 'Wielka litera',
|
||||||
@@ -193,28 +198,17 @@ const native: TranslationStrings = {
|
|||||||
'native.welcome.photosTitle': 'Zdjęcia i fotoksiążka',
|
'native.welcome.photosTitle': 'Zdjęcia i fotoksiążka',
|
||||||
'native.welcome.photosSub': 'Wspomnienia zostają przy podróży',
|
'native.welcome.photosSub': 'Wspomnienia zostają przy podróży',
|
||||||
'native.welcome.discover': 'Poznaj plany w chmurze',
|
'native.welcome.discover': 'Poznaj plany w chmurze',
|
||||||
'native.trip.start.title': 'Weekendowy wypad',
|
|
||||||
'native.trip.start.text': 'Krótkie wyjazdy, głównie planowanie.',
|
|
||||||
'native.trip.basis.title': 'Objazdówka',
|
|
||||||
'native.trip.basis.text': 'Kilka miejsc, rezerwacje automatycznie.',
|
|
||||||
'native.trip.plus.title': 'Wielka podróż',
|
|
||||||
'native.trip.plus.text': 'Tygodnie w drodze, z całą grupą.',
|
|
||||||
'native.trip.pro.title': 'Obieżyświat',
|
|
||||||
'native.trip.pro.text': 'Dla częstych podróżników i dużych fotoksiążek.',
|
|
||||||
'native.plans.unlimited': 'Bez limitu',
|
'native.plans.unlimited': 'Bez limitu',
|
||||||
'native.plans.unlimitedSub': 'Podróże i współtowarzysze',
|
'native.plans.unlimitedSub': 'Podróże i współtowarzysze',
|
||||||
'native.plans.inEveryPlan': 'w każdym planie',
|
|
||||||
'native.plans.yearlyIs': '{price} rocznie, rezygnacja w każdej chwili',
|
'native.plans.yearlyIs': '{price} rocznie, rezygnacja w każdej chwili',
|
||||||
'native.plans.monthlyIs': 'To {price} miesięcznie',
|
'native.plans.monthlyIs': 'To {price} miesięcznie',
|
||||||
'native.plans.storageFairUse': 'Miejsce w ramach uczciwego użytkowania',
|
'native.plans.storage': 'Magazyn',
|
||||||
'native.plans.aiPerMonth': '{n} / miesiąc',
|
'native.plans.notIncluded': 'Niedostępne',
|
||||||
'native.plans.aiNone': 'Niedostępne',
|
|
||||||
'native.plans.included': 'W pakiecie',
|
'native.plans.included': 'W pakiecie',
|
||||||
'native.plans.planned': 'Planowane',
|
|
||||||
'native.plans.assistant': 'Asystent AI',
|
'native.plans.assistant': 'Asystent AI',
|
||||||
'native.plans.mailImport': 'Automatyczny import poczty',
|
'native.plans.mailImport': 'Automatyczny import poczty',
|
||||||
'native.plans.aiLabel': 'Dokumenty AI',
|
'native.plans.aiLabel': 'Dokumenty AI',
|
||||||
'native.plans.choose': 'Wybierz: {trip}',
|
'native.plans.choose': 'Wybierz: {plan}',
|
||||||
'native.plans.termsShort': 'Warunki korzystania (EULA)',
|
'native.plans.termsShort': 'Warunki korzystania (EULA)',
|
||||||
'native.plans.privacyShort': 'Prywatność',
|
'native.plans.privacyShort': 'Prywatność',
|
||||||
'native.plans.billing': 'Rozliczenie',
|
'native.plans.billing': 'Rozliczenie',
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
import type { TranslationStrings } from '../types';
|
import type { TranslationStrings } from '../types';
|
||||||
|
|
||||||
const native: TranslationStrings = {
|
const native: TranslationStrings = {
|
||||||
|
'native.trial.cancelApple':
|
||||||
|
'Чтобы избежать списания, отмените подписку в App Store не менее чем за 24 часа до конца пробного периода.',
|
||||||
|
'native.trial.cancelPlay': 'Чтобы избежать списания, отмените подписку в Google Play до конца пробного периода.',
|
||||||
|
'native.trial.badge': '7 дней бесплатно',
|
||||||
|
'native.trial.price': '7 дней бесплатно, затем {price} {period}.',
|
||||||
|
'native.trial.changed': 'Предложение изменилось. Вернитесь к тарифам и проверьте актуальную цену.',
|
||||||
'native.connect.title': 'Подключение к TREK',
|
'native.connect.title': 'Подключение к TREK',
|
||||||
'native.connect.hint': 'Введите адрес, по которому вы открываете TREK в браузере.',
|
'native.connect.hint': 'Введите адрес, по которому вы открываете TREK в браузере.',
|
||||||
'native.connect.placeholder': 'https://trek.example.com',
|
'native.connect.placeholder': 'https://trek.example.com',
|
||||||
@@ -66,7 +72,6 @@ const native: TranslationStrings = {
|
|||||||
'native.plans.legalAndroid':
|
'native.plans.legalAndroid':
|
||||||
'Оплата списывается с вашего аккаунта Google при подтверждении. Подписка продлевается автоматически, если вы не отмените её до конца периода. Управлять ею или отменить можно в Google Play: Профиль, Платежи и подписки, Подписки.',
|
'Оплата списывается с вашего аккаунта Google при подтверждении. Подписка продлевается автоматически, если вы не отмените её до конца периода. Управлять ею или отменить можно в Google Play: Профиль, Платежи и подписки, Подписки.',
|
||||||
'native.plans.restoreNoneAndroid': 'Для этого аккаунта Google активная подписка не найдена.',
|
'native.plans.restoreNoneAndroid': 'Для этого аккаунта Google активная подписка не найдена.',
|
||||||
'native.plans.recommended': 'Рекомендуем',
|
|
||||||
'native.claim.change': 'Изменить',
|
'native.claim.change': 'Изменить',
|
||||||
'native.claim.ruleLength': 'символов',
|
'native.claim.ruleLength': 'символов',
|
||||||
'native.claim.ruleUpper': 'Заглавная буква',
|
'native.claim.ruleUpper': 'Заглавная буква',
|
||||||
@@ -196,28 +201,17 @@ const native: TranslationStrings = {
|
|||||||
'native.welcome.photosTitle': 'Фото и фотокнига',
|
'native.welcome.photosTitle': 'Фото и фотокнига',
|
||||||
'native.welcome.photosSub': 'Воспоминания остаются с поездкой',
|
'native.welcome.photosSub': 'Воспоминания остаются с поездкой',
|
||||||
'native.welcome.discover': 'Посмотреть облачные тарифы',
|
'native.welcome.discover': 'Посмотреть облачные тарифы',
|
||||||
'native.trip.start.title': 'Выходные',
|
|
||||||
'native.trip.start.text': 'Короткие поездки, в основном планирование.',
|
|
||||||
'native.trip.basis.title': 'Тур',
|
|
||||||
'native.trip.basis.text': 'Несколько мест, бронирования автоматически.',
|
|
||||||
'native.trip.plus.title': 'Большое путешествие',
|
|
||||||
'native.trip.plus.text': 'Недели в пути, всей группой.',
|
|
||||||
'native.trip.pro.title': 'Путешественник',
|
|
||||||
'native.trip.pro.text': 'Для тех, кто часто в пути, и больших фотокниг.',
|
|
||||||
'native.plans.unlimited': 'Без ограничений',
|
'native.plans.unlimited': 'Без ограничений',
|
||||||
'native.plans.unlimitedSub': 'Поездки и попутчики',
|
'native.plans.unlimitedSub': 'Поездки и попутчики',
|
||||||
'native.plans.inEveryPlan': 'в каждом тарифе',
|
|
||||||
'native.plans.yearlyIs': '{price} в год, отмена в любое время',
|
'native.plans.yearlyIs': '{price} в год, отмена в любое время',
|
||||||
'native.plans.monthlyIs': 'Это {price} в месяц',
|
'native.plans.monthlyIs': 'Это {price} в месяц',
|
||||||
'native.plans.storageFairUse': 'Хранилище по правилам добросовестного использования',
|
'native.plans.storage': 'Хранилище',
|
||||||
'native.plans.aiPerMonth': '{n} / мес.',
|
'native.plans.notIncluded': 'Не включено',
|
||||||
'native.plans.aiNone': 'Не включено',
|
|
||||||
'native.plans.included': 'Включено',
|
'native.plans.included': 'Включено',
|
||||||
'native.plans.planned': 'Планируется',
|
|
||||||
'native.plans.assistant': 'ИИ-помощник',
|
'native.plans.assistant': 'ИИ-помощник',
|
||||||
'native.plans.mailImport': 'Автоматический импорт писем',
|
'native.plans.mailImport': 'Автоматический импорт писем',
|
||||||
'native.plans.aiLabel': 'Документы ИИ',
|
'native.plans.aiLabel': 'Документы ИИ',
|
||||||
'native.plans.choose': 'Выбрать: {trip}',
|
'native.plans.choose': 'Выбрать: {plan}',
|
||||||
'native.plans.termsShort': 'Условия использования (EULA)',
|
'native.plans.termsShort': 'Условия использования (EULA)',
|
||||||
'native.plans.privacyShort': 'Конфиденциальность',
|
'native.plans.privacyShort': 'Конфиденциальность',
|
||||||
'native.plans.billing': 'Оплата',
|
'native.plans.billing': 'Оплата',
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
import type { TranslationStrings } from '../types';
|
import type { TranslationStrings } from '../types';
|
||||||
|
|
||||||
const native: TranslationStrings = {
|
const native: TranslationStrings = {
|
||||||
|
'native.trial.cancelApple':
|
||||||
|
'Poplatku predídete zrušením predplatného v App Store najneskôr 24 hodín pred koncom skúšobnej doby.',
|
||||||
|
'native.trial.cancelPlay': 'Poplatku predídete zrušením predplatného v Google Play pred koncom skúšobnej doby.',
|
||||||
|
'native.trial.badge': '7 dní zadarmo',
|
||||||
|
'native.trial.price': '7 dní zadarmo, potom {price} {period}.',
|
||||||
|
'native.trial.changed': 'Ponuka sa zmenila. Vráťte sa k plánom a skontrolujte aktuálnu cenu.',
|
||||||
'native.connect.title': 'Pripojiť k TREK',
|
'native.connect.title': 'Pripojiť k TREK',
|
||||||
'native.connect.hint': 'Zadajte adresu, na ktorej otvárate TREK v prehliadači.',
|
'native.connect.hint': 'Zadajte adresu, na ktorej otvárate TREK v prehliadači.',
|
||||||
'native.connect.placeholder': 'https://trek.example.com',
|
'native.connect.placeholder': 'https://trek.example.com',
|
||||||
@@ -65,7 +71,6 @@ const native: TranslationStrings = {
|
|||||||
'native.plans.legalAndroid':
|
'native.plans.legalAndroid':
|
||||||
'Platba sa pri potvrdení strhne z vášho účtu Google. Predplatné sa automaticky obnovuje, ak ho nezrušíte pred koncom obdobia. Spravovať alebo zrušiť ho môžete v Google Play v časti Profil, Platby a odbery, Odbery.',
|
'Platba sa pri potvrdení strhne z vášho účtu Google. Predplatné sa automaticky obnovuje, ak ho nezrušíte pred koncom obdobia. Spravovať alebo zrušiť ho môžete v Google Play v časti Profil, Platby a odbery, Odbery.',
|
||||||
'native.plans.restoreNoneAndroid': 'Pre tento účet Google sa nenašlo žiadne aktívne predplatné.',
|
'native.plans.restoreNoneAndroid': 'Pre tento účet Google sa nenašlo žiadne aktívne predplatné.',
|
||||||
'native.plans.recommended': 'Odporúčané',
|
|
||||||
'native.claim.change': 'Zmeniť',
|
'native.claim.change': 'Zmeniť',
|
||||||
'native.claim.ruleLength': 'znakov',
|
'native.claim.ruleLength': 'znakov',
|
||||||
'native.claim.ruleUpper': 'Veľké písmeno',
|
'native.claim.ruleUpper': 'Veľké písmeno',
|
||||||
@@ -191,28 +196,17 @@ const native: TranslationStrings = {
|
|||||||
'native.welcome.photosTitle': 'Fotky a fotokniha',
|
'native.welcome.photosTitle': 'Fotky a fotokniha',
|
||||||
'native.welcome.photosSub': 'Spomienky zostávajú pri ceste',
|
'native.welcome.photosSub': 'Spomienky zostávajú pri ceste',
|
||||||
'native.welcome.discover': 'Pozrieť cloudové tarify',
|
'native.welcome.discover': 'Pozrieť cloudové tarify',
|
||||||
'native.trip.start.title': 'Víkendovka',
|
|
||||||
'native.trip.start.text': 'Krátke cesty, hlavne plánovanie.',
|
|
||||||
'native.trip.basis.title': 'Okružná cesta',
|
|
||||||
'native.trip.basis.text': 'Viac miest, rezervácie automaticky.',
|
|
||||||
'native.trip.plus.title': 'Veľká cesta',
|
|
||||||
'native.trip.plus.text': 'Týždne na cestách, s celou skupinou.',
|
|
||||||
'native.trip.pro.title': 'Svetobežník',
|
|
||||||
'native.trip.pro.text': 'Pre častých cestovateľov a veľké fotoknihy.',
|
|
||||||
'native.plans.unlimited': 'Neobmedzene',
|
'native.plans.unlimited': 'Neobmedzene',
|
||||||
'native.plans.unlimitedSub': 'Cesty a spolucestujúci',
|
'native.plans.unlimitedSub': 'Cesty a spolucestujúci',
|
||||||
'native.plans.inEveryPlan': 'v každom tarife',
|
|
||||||
'native.plans.yearlyIs': '{price} ročne, zrušenie kedykoľvek',
|
'native.plans.yearlyIs': '{price} ročne, zrušenie kedykoľvek',
|
||||||
'native.plans.monthlyIs': 'To je {price} mesačne',
|
'native.plans.monthlyIs': 'To je {price} mesačne',
|
||||||
'native.plans.storageFairUse': 'Úložisko v režime primeraného využitia',
|
'native.plans.storage': 'Úložisko',
|
||||||
'native.plans.aiPerMonth': '{n} / mesiac',
|
'native.plans.notIncluded': 'Nie je zahrnuté',
|
||||||
'native.plans.aiNone': 'Nie je zahrnuté',
|
|
||||||
'native.plans.included': 'Zahrnuté',
|
'native.plans.included': 'Zahrnuté',
|
||||||
'native.plans.planned': 'Plánované',
|
|
||||||
'native.plans.assistant': 'Asistent AI',
|
'native.plans.assistant': 'Asistent AI',
|
||||||
'native.plans.mailImport': 'Automatický import e-mailov',
|
'native.plans.mailImport': 'Automatický import e-mailov',
|
||||||
'native.plans.aiLabel': 'Dokumenty AI',
|
'native.plans.aiLabel': 'Dokumenty AI',
|
||||||
'native.plans.choose': 'Vybrať: {trip}',
|
'native.plans.choose': 'Vybrať: {plan}',
|
||||||
'native.plans.termsShort': 'Podmienky používania (EULA)',
|
'native.plans.termsShort': 'Podmienky používania (EULA)',
|
||||||
'native.plans.privacyShort': 'Súkromie',
|
'native.plans.privacyShort': 'Súkromie',
|
||||||
'native.plans.billing': 'Platba',
|
'native.plans.billing': 'Platba',
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
import type { TranslationStrings } from '../types';
|
import type { TranslationStrings } from '../types';
|
||||||
|
|
||||||
const native: TranslationStrings = {
|
const native: TranslationStrings = {
|
||||||
|
'native.trial.cancelApple':
|
||||||
|
'För att undvika debitering, säg upp i App Store minst 24 timmar innan provperioden slutar.',
|
||||||
|
'native.trial.cancelPlay': 'För att undvika debitering, säg upp i Google Play innan provperioden slutar.',
|
||||||
|
'native.trial.badge': '7 dagar gratis',
|
||||||
|
'native.trial.price': '7 dagar gratis, därefter {price} {period}.',
|
||||||
|
'native.trial.changed': 'Erbjudandet har ändrats. Gå tillbaka till abonnemangen och kontrollera det aktuella priset.',
|
||||||
'native.connect.title': 'Anslut till TREK',
|
'native.connect.title': 'Anslut till TREK',
|
||||||
'native.connect.hint': 'Ange adressen du öppnar TREK på i webbläsaren.',
|
'native.connect.hint': 'Ange adressen du öppnar TREK på i webbläsaren.',
|
||||||
'native.connect.placeholder': 'https://trek.example.com',
|
'native.connect.placeholder': 'https://trek.example.com',
|
||||||
@@ -66,7 +72,6 @@ const native: TranslationStrings = {
|
|||||||
'native.plans.legalAndroid':
|
'native.plans.legalAndroid':
|
||||||
'Betalningen debiteras ditt Google-konto när du bekräftar. Prenumerationen förnyas automatiskt om du inte säger upp den innan perioden tar slut. Hantera eller säg upp den i Google Play under Profil, Betalningar och prenumerationer, Prenumerationer.',
|
'Betalningen debiteras ditt Google-konto när du bekräftar. Prenumerationen förnyas automatiskt om du inte säger upp den innan perioden tar slut. Hantera eller säg upp den i Google Play under Profil, Betalningar och prenumerationer, Prenumerationer.',
|
||||||
'native.plans.restoreNoneAndroid': 'Ingen aktiv prenumeration hittades för det här Google-kontot.',
|
'native.plans.restoreNoneAndroid': 'Ingen aktiv prenumeration hittades för det här Google-kontot.',
|
||||||
'native.plans.recommended': 'Rekommenderas',
|
|
||||||
'native.claim.change': 'Ändra',
|
'native.claim.change': 'Ändra',
|
||||||
'native.claim.ruleLength': 'tecken',
|
'native.claim.ruleLength': 'tecken',
|
||||||
'native.claim.ruleUpper': 'Versal',
|
'native.claim.ruleUpper': 'Versal',
|
||||||
@@ -192,28 +197,17 @@ const native: TranslationStrings = {
|
|||||||
'native.welcome.photosTitle': 'Bilder och fotobok',
|
'native.welcome.photosTitle': 'Bilder och fotobok',
|
||||||
'native.welcome.photosSub': 'Minnena stannar hos resan',
|
'native.welcome.photosSub': 'Minnena stannar hos resan',
|
||||||
'native.welcome.discover': 'Utforska molnplaner',
|
'native.welcome.discover': 'Utforska molnplaner',
|
||||||
'native.trip.start.title': 'Weekendresa',
|
|
||||||
'native.trip.start.text': 'Korta resor, mest planering.',
|
|
||||||
'native.trip.basis.title': 'Rundresa',
|
|
||||||
'native.trip.basis.text': 'Flera stopp, bokningar automatiskt.',
|
|
||||||
'native.trip.plus.title': 'Stor resa',
|
|
||||||
'native.trip.plus.text': 'Veckor på vägen, med hela gruppen.',
|
|
||||||
'native.trip.pro.title': 'Världsresenär',
|
|
||||||
'native.trip.pro.text': 'För dig som reser ofta och gör stora fotoböcker.',
|
|
||||||
'native.plans.unlimited': 'Obegränsat',
|
'native.plans.unlimited': 'Obegränsat',
|
||||||
'native.plans.unlimitedSub': 'Resor och medresenärer',
|
'native.plans.unlimitedSub': 'Resor och medresenärer',
|
||||||
'native.plans.inEveryPlan': 'i varje plan',
|
|
||||||
'native.plans.yearlyIs': '{price} per år, avsluta när du vill',
|
'native.plans.yearlyIs': '{price} per år, avsluta när du vill',
|
||||||
'native.plans.monthlyIs': 'Det blir {price} i månaden',
|
'native.plans.monthlyIs': 'Det blir {price} i månaden',
|
||||||
'native.plans.storageFairUse': 'Lagring vid skälig användning',
|
'native.plans.storage': 'Lagring',
|
||||||
'native.plans.aiPerMonth': '{n} / månad',
|
'native.plans.notIncluded': 'Ingår inte',
|
||||||
'native.plans.aiNone': 'Ingår inte',
|
|
||||||
'native.plans.included': 'Ingår',
|
'native.plans.included': 'Ingår',
|
||||||
'native.plans.planned': 'Planerat',
|
|
||||||
'native.plans.assistant': 'AI-assistent',
|
'native.plans.assistant': 'AI-assistent',
|
||||||
'native.plans.mailImport': 'Automatisk e-postimport',
|
'native.plans.mailImport': 'Automatisk e-postimport',
|
||||||
'native.plans.aiLabel': 'AI-dokument',
|
'native.plans.aiLabel': 'AI-dokument',
|
||||||
'native.plans.choose': 'Välj {trip}',
|
'native.plans.choose': 'Välj {plan}',
|
||||||
'native.plans.termsShort': 'Användarvillkor (EULA)',
|
'native.plans.termsShort': 'Användarvillkor (EULA)',
|
||||||
'native.plans.privacyShort': 'Integritet',
|
'native.plans.privacyShort': 'Integritet',
|
||||||
'native.plans.billing': 'Betalning',
|
'native.plans.billing': 'Betalning',
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
import type { TranslationStrings } from '../types';
|
import type { TranslationStrings } from '../types';
|
||||||
|
|
||||||
const native: TranslationStrings = {
|
const native: TranslationStrings = {
|
||||||
|
'native.trial.cancelApple': 'เพื่อไม่ให้ถูกเรียกเก็บเงิน ให้ยกเลิกใน App Store อย่างน้อย 24 ชั่วโมงก่อนหมดช่วงทดลองใช้ฟรี',
|
||||||
|
'native.trial.cancelPlay': 'เพื่อไม่ให้ถูกเรียกเก็บเงิน ให้ยกเลิกใน Google Play ก่อนหมดช่วงทดลองใช้ฟรี',
|
||||||
|
'native.trial.badge': 'ฟรี 7 วัน',
|
||||||
|
'native.trial.price': 'ฟรี 7 วัน จากนั้น {price} {period}',
|
||||||
|
'native.trial.changed': 'ข้อเสนอมีการเปลี่ยนแปลง โปรดกลับไปที่รายการแพ็กเกจและตรวจสอบราคาปัจจุบัน',
|
||||||
'native.connect.title': 'เชื่อมต่อกับ TREK',
|
'native.connect.title': 'เชื่อมต่อกับ TREK',
|
||||||
'native.connect.hint': 'ป้อนที่อยู่ที่คุณใช้เปิด TREK ในเบราว์เซอร์',
|
'native.connect.hint': 'ป้อนที่อยู่ที่คุณใช้เปิด TREK ในเบราว์เซอร์',
|
||||||
'native.connect.placeholder': 'https://trek.example.com',
|
'native.connect.placeholder': 'https://trek.example.com',
|
||||||
@@ -61,7 +66,6 @@ const native: TranslationStrings = {
|
|||||||
'native.plans.legalAndroid':
|
'native.plans.legalAndroid':
|
||||||
'ระบบจะเรียกเก็บเงินจากบัญชี Google ของคุณเมื่อยืนยัน การสมัครสมาชิกจะต่ออายุอัตโนมัติ เว้นแต่คุณจะยกเลิกก่อนสิ้นสุดรอบ จัดการหรือยกเลิกได้ใน Google Play ที่ โปรไฟล์ การชำระเงินและการสมัครใช้บริการ การสมัครใช้บริการ',
|
'ระบบจะเรียกเก็บเงินจากบัญชี Google ของคุณเมื่อยืนยัน การสมัครสมาชิกจะต่ออายุอัตโนมัติ เว้นแต่คุณจะยกเลิกก่อนสิ้นสุดรอบ จัดการหรือยกเลิกได้ใน Google Play ที่ โปรไฟล์ การชำระเงินและการสมัครใช้บริการ การสมัครใช้บริการ',
|
||||||
'native.plans.restoreNoneAndroid': 'ไม่พบการสมัครสมาชิกที่ใช้งานอยู่ในบัญชี Google นี้',
|
'native.plans.restoreNoneAndroid': 'ไม่พบการสมัครสมาชิกที่ใช้งานอยู่ในบัญชี Google นี้',
|
||||||
'native.plans.recommended': 'แนะนำ',
|
|
||||||
'native.claim.change': 'เปลี่ยน',
|
'native.claim.change': 'เปลี่ยน',
|
||||||
'native.claim.ruleLength': 'ตัวอักษร',
|
'native.claim.ruleLength': 'ตัวอักษร',
|
||||||
'native.claim.ruleUpper': 'ตัวพิมพ์ใหญ่',
|
'native.claim.ruleUpper': 'ตัวพิมพ์ใหญ่',
|
||||||
@@ -181,28 +185,17 @@ const native: TranslationStrings = {
|
|||||||
'native.welcome.photosTitle': 'รูปภาพและโฟโต้บุ๊ก',
|
'native.welcome.photosTitle': 'รูปภาพและโฟโต้บุ๊ก',
|
||||||
'native.welcome.photosSub': 'ความทรงจำอยู่คู่กับทริป',
|
'native.welcome.photosSub': 'ความทรงจำอยู่คู่กับทริป',
|
||||||
'native.welcome.discover': 'ดูแพ็กเกจคลาวด์',
|
'native.welcome.discover': 'ดูแพ็กเกจคลาวด์',
|
||||||
'native.trip.start.title': 'ทริปสุดสัปดาห์',
|
|
||||||
'native.trip.start.text': 'ทริปสั้น เน้นวางแผน',
|
|
||||||
'native.trip.basis.title': 'ทริปหลายเมือง',
|
|
||||||
'native.trip.basis.text': 'หลายจุดหมาย จองอัตโนมัติ',
|
|
||||||
'native.trip.plus.title': 'ทริปใหญ่',
|
|
||||||
'native.trip.plus.text': 'อยู่บนถนนหลายสัปดาห์ กับทั้งกลุ่ม',
|
|
||||||
'native.trip.pro.title': 'นักเดินทางรอบโลก',
|
|
||||||
'native.trip.pro.text': 'สำหรับคนเดินทางบ่อยและโฟโต้บุ๊กเล่มใหญ่',
|
|
||||||
'native.plans.unlimited': 'ไม่จำกัด',
|
'native.plans.unlimited': 'ไม่จำกัด',
|
||||||
'native.plans.unlimitedSub': 'ทริปและเพื่อนร่วมทาง',
|
'native.plans.unlimitedSub': 'ทริปและเพื่อนร่วมทาง',
|
||||||
'native.plans.inEveryPlan': 'ในทุกแพ็กเกจ',
|
|
||||||
'native.plans.yearlyIs': 'ปีละ {price} ยกเลิกได้ทุกเมื่อ',
|
'native.plans.yearlyIs': 'ปีละ {price} ยกเลิกได้ทุกเมื่อ',
|
||||||
'native.plans.monthlyIs': 'เท่ากับเดือนละ {price}',
|
'native.plans.monthlyIs': 'เท่ากับเดือนละ {price}',
|
||||||
'native.plans.storageFairUse': 'พื้นที่เก็บข้อมูลภายใต้การใช้งานอย่างเหมาะสม',
|
'native.plans.storage': 'ที่เก็บของ',
|
||||||
'native.plans.aiPerMonth': '{n} / เดือน',
|
'native.plans.notIncluded': 'ไม่รวม',
|
||||||
'native.plans.aiNone': 'ไม่รวม',
|
|
||||||
'native.plans.included': 'รวมแล้ว',
|
'native.plans.included': 'รวมแล้ว',
|
||||||
'native.plans.planned': 'อยู่ในแผน',
|
|
||||||
'native.plans.assistant': 'ผู้ช่วย AI',
|
'native.plans.assistant': 'ผู้ช่วย AI',
|
||||||
'native.plans.mailImport': 'นำเข้าอีเมลอัตโนมัติ',
|
'native.plans.mailImport': 'นำเข้าอีเมลอัตโนมัติ',
|
||||||
'native.plans.aiLabel': 'เอกสาร AI',
|
'native.plans.aiLabel': 'เอกสาร AI',
|
||||||
'native.plans.choose': 'เลือก{trip}',
|
'native.plans.choose': 'เลือก{plan}',
|
||||||
'native.plans.termsShort': 'ข้อกำหนดการใช้งาน (EULA)',
|
'native.plans.termsShort': 'ข้อกำหนดการใช้งาน (EULA)',
|
||||||
'native.plans.privacyShort': 'ความเป็นส่วนตัว',
|
'native.plans.privacyShort': 'ความเป็นส่วนตัว',
|
||||||
'native.plans.billing': 'การชำระเงิน',
|
'native.plans.billing': 'การชำระเงิน',
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
import type { TranslationStrings } from '../types';
|
import type { TranslationStrings } from '../types';
|
||||||
|
|
||||||
const native: TranslationStrings = {
|
const native: TranslationStrings = {
|
||||||
|
'native.trial.cancelApple': 'Ücret alınmaması için deneme bitmeden en az 24 saat önce App Store’dan iptal et.',
|
||||||
|
'native.trial.cancelPlay': 'Ücret alınmaması için deneme bitmeden önce Google Play’den iptal et.',
|
||||||
|
'native.trial.badge': '7 gün ücretsiz',
|
||||||
|
'native.trial.price': '7 gün ücretsiz, ardından {period} {price}.',
|
||||||
|
'native.trial.changed': 'Teklif değişti. Planlara dönüp güncel fiyatı kontrol et.',
|
||||||
'native.connect.title': 'TREK’e bağlan',
|
'native.connect.title': 'TREK’e bağlan',
|
||||||
'native.connect.hint': 'TREK’i tarayıcında açtığın adresi gir.',
|
'native.connect.hint': 'TREK’i tarayıcında açtığın adresi gir.',
|
||||||
'native.connect.placeholder': 'https://trek.example.com',
|
'native.connect.placeholder': 'https://trek.example.com',
|
||||||
@@ -65,7 +70,6 @@ const native: TranslationStrings = {
|
|||||||
'native.plans.legalAndroid':
|
'native.plans.legalAndroid':
|
||||||
"Ödeme, onayladığınızda Google hesabınızdan tahsil edilir. Abonelik, dönem bitmeden iptal etmezseniz otomatik olarak yenilenir. Google Play'de Profil, Ödemeler ve abonelikler, Abonelikler bölümünden yönetebilir veya iptal edebilirsiniz.",
|
"Ödeme, onayladığınızda Google hesabınızdan tahsil edilir. Abonelik, dönem bitmeden iptal etmezseniz otomatik olarak yenilenir. Google Play'de Profil, Ödemeler ve abonelikler, Abonelikler bölümünden yönetebilir veya iptal edebilirsiniz.",
|
||||||
'native.plans.restoreNoneAndroid': 'Bu Google hesabında etkin abonelik bulunamadı.',
|
'native.plans.restoreNoneAndroid': 'Bu Google hesabında etkin abonelik bulunamadı.',
|
||||||
'native.plans.recommended': 'Önerilen',
|
|
||||||
'native.claim.change': 'Değiştir',
|
'native.claim.change': 'Değiştir',
|
||||||
'native.claim.ruleLength': 'karakter',
|
'native.claim.ruleLength': 'karakter',
|
||||||
'native.claim.ruleUpper': 'Büyük harf',
|
'native.claim.ruleUpper': 'Büyük harf',
|
||||||
@@ -192,28 +196,17 @@ const native: TranslationStrings = {
|
|||||||
'native.welcome.photosTitle': 'Fotoğraflar ve fotoğraf kitabı',
|
'native.welcome.photosTitle': 'Fotoğraflar ve fotoğraf kitabı',
|
||||||
'native.welcome.photosSub': 'Anılar yolculukla birlikte kalır',
|
'native.welcome.photosSub': 'Anılar yolculukla birlikte kalır',
|
||||||
'native.welcome.discover': 'Bulut paketlerini keşfet',
|
'native.welcome.discover': 'Bulut paketlerini keşfet',
|
||||||
'native.trip.start.title': 'Hafta sonu kaçamağı',
|
|
||||||
'native.trip.start.text': 'Kısa yolculuklar, çoğunlukla planlama.',
|
|
||||||
'native.trip.basis.title': 'Tur',
|
|
||||||
'native.trip.basis.text': 'Birkaç durak, rezervasyonlar otomatik.',
|
|
||||||
'native.trip.plus.title': 'Büyük yolculuk',
|
|
||||||
'native.trip.plus.text': 'Haftalarca yolda, tüm grupla.',
|
|
||||||
'native.trip.pro.title': 'Dünya gezgini',
|
|
||||||
'native.trip.pro.text': 'Sık seyahat edenler ve büyük fotoğraf kitapları için.',
|
|
||||||
'native.plans.unlimited': 'Sınırsız',
|
'native.plans.unlimited': 'Sınırsız',
|
||||||
'native.plans.unlimitedSub': 'Yolculuklar ve yol arkadaşları',
|
'native.plans.unlimitedSub': 'Yolculuklar ve yol arkadaşları',
|
||||||
'native.plans.inEveryPlan': 'her pakette',
|
|
||||||
'native.plans.yearlyIs': 'Yıllık {price}, istediğin zaman iptal',
|
'native.plans.yearlyIs': 'Yıllık {price}, istediğin zaman iptal',
|
||||||
'native.plans.monthlyIs': 'Ayda {price} eder',
|
'native.plans.monthlyIs': 'Ayda {price} eder',
|
||||||
'native.plans.storageFairUse': 'Adil kullanım depolama alanı',
|
'native.plans.storage': 'Depolama',
|
||||||
'native.plans.aiPerMonth': '{n} / ay',
|
'native.plans.notIncluded': 'Dahil değil',
|
||||||
'native.plans.aiNone': 'Dahil değil',
|
|
||||||
'native.plans.included': 'Dahil',
|
'native.plans.included': 'Dahil',
|
||||||
'native.plans.planned': 'Planlanıyor',
|
|
||||||
'native.plans.assistant': 'Yapay zekâ asistanı',
|
'native.plans.assistant': 'Yapay zekâ asistanı',
|
||||||
'native.plans.mailImport': 'Otomatik e-posta içe aktarma',
|
'native.plans.mailImport': 'Otomatik e-posta içe aktarma',
|
||||||
'native.plans.aiLabel': 'Yapay zekâ belgeleri',
|
'native.plans.aiLabel': 'Yapay zekâ belgeleri',
|
||||||
'native.plans.choose': '{trip} seç',
|
'native.plans.choose': '{plan} seç',
|
||||||
'native.plans.termsShort': 'Kullanım Koşulları (EULA)',
|
'native.plans.termsShort': 'Kullanım Koşulları (EULA)',
|
||||||
'native.plans.privacyShort': 'Gizlilik',
|
'native.plans.privacyShort': 'Gizlilik',
|
||||||
'native.plans.billing': 'Ödeme',
|
'native.plans.billing': 'Ödeme',
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
import type { TranslationStrings } from '../types';
|
import type { TranslationStrings } from '../types';
|
||||||
|
|
||||||
const native: TranslationStrings = {
|
const native: TranslationStrings = {
|
||||||
|
'native.trial.cancelApple':
|
||||||
|
'Щоб уникнути списання, скасуйте підписку в App Store щонайменше за 24 години до кінця пробного періоду.',
|
||||||
|
'native.trial.cancelPlay': 'Щоб уникнути списання, скасуйте підписку в Google Play до кінця пробного періоду.',
|
||||||
|
'native.trial.badge': '7 днів безкоштовно',
|
||||||
|
'native.trial.price': '7 днів безкоштовно, потім {price} {period}.',
|
||||||
|
'native.trial.changed': 'Пропозиція змінилася. Поверніться до тарифів і перевірте актуальну ціну.',
|
||||||
'native.connect.title': 'Підключення до TREK',
|
'native.connect.title': 'Підключення до TREK',
|
||||||
'native.connect.hint': 'Введіть адресу, за якою ви відкриваєте TREK у браузері.',
|
'native.connect.hint': 'Введіть адресу, за якою ви відкриваєте TREK у браузері.',
|
||||||
'native.connect.placeholder': 'https://trek.example.com',
|
'native.connect.placeholder': 'https://trek.example.com',
|
||||||
@@ -66,7 +72,6 @@ const native: TranslationStrings = {
|
|||||||
'native.plans.legalAndroid':
|
'native.plans.legalAndroid':
|
||||||
'Оплата списується з вашого облікового запису Google під час підтвердження. Підписка подовжується автоматично, якщо ви не скасуєте її до кінця періоду. Керувати нею або скасувати можна в Google Play: Профіль, Платежі й підписки, Підписки.',
|
'Оплата списується з вашого облікового запису Google під час підтвердження. Підписка подовжується автоматично, якщо ви не скасуєте її до кінця періоду. Керувати нею або скасувати можна в Google Play: Профіль, Платежі й підписки, Підписки.',
|
||||||
'native.plans.restoreNoneAndroid': 'Для цього облікового запису Google активної підписки не знайдено.',
|
'native.plans.restoreNoneAndroid': 'Для цього облікового запису Google активної підписки не знайдено.',
|
||||||
'native.plans.recommended': 'Рекомендуємо',
|
|
||||||
'native.claim.change': 'Змінити',
|
'native.claim.change': 'Змінити',
|
||||||
'native.claim.ruleLength': 'символів',
|
'native.claim.ruleLength': 'символів',
|
||||||
'native.claim.ruleUpper': 'Велика літера',
|
'native.claim.ruleUpper': 'Велика літера',
|
||||||
@@ -193,28 +198,17 @@ const native: TranslationStrings = {
|
|||||||
'native.welcome.photosTitle': 'Фото й фотокнига',
|
'native.welcome.photosTitle': 'Фото й фотокнига',
|
||||||
'native.welcome.photosSub': 'Спогади залишаються з поїздкою',
|
'native.welcome.photosSub': 'Спогади залишаються з поїздкою',
|
||||||
'native.welcome.discover': 'Переглянути хмарні тарифи',
|
'native.welcome.discover': 'Переглянути хмарні тарифи',
|
||||||
'native.trip.start.title': 'Вихідні',
|
|
||||||
'native.trip.start.text': 'Короткі поїздки, здебільшого планування.',
|
|
||||||
'native.trip.basis.title': 'Тур',
|
|
||||||
'native.trip.basis.text': 'Кілька місць, бронювання автоматично.',
|
|
||||||
'native.trip.plus.title': 'Велика подорож',
|
|
||||||
'native.trip.plus.text': 'Тижні в дорозі, усією групою.',
|
|
||||||
'native.trip.pro.title': 'Мандрівник',
|
|
||||||
'native.trip.pro.text': 'Для тих, хто часто в дорозі, і великих фотокниг.',
|
|
||||||
'native.plans.unlimited': 'Без обмежень',
|
'native.plans.unlimited': 'Без обмежень',
|
||||||
'native.plans.unlimitedSub': 'Поїздки й попутники',
|
'native.plans.unlimitedSub': 'Поїздки й попутники',
|
||||||
'native.plans.inEveryPlan': 'у кожному тарифі',
|
|
||||||
'native.plans.yearlyIs': '{price} на рік, скасування будь-коли',
|
'native.plans.yearlyIs': '{price} на рік, скасування будь-коли',
|
||||||
'native.plans.monthlyIs': 'Це {price} на місяць',
|
'native.plans.monthlyIs': 'Це {price} на місяць',
|
||||||
'native.plans.storageFairUse': 'Сховище за правилами добросовісного використання',
|
'native.plans.storage': 'Сховище',
|
||||||
'native.plans.aiPerMonth': '{n} / міс.',
|
'native.plans.notIncluded': 'Не включено',
|
||||||
'native.plans.aiNone': 'Не включено',
|
|
||||||
'native.plans.included': 'Включено',
|
'native.plans.included': 'Включено',
|
||||||
'native.plans.planned': 'Заплановано',
|
|
||||||
'native.plans.assistant': 'Асистент ШІ',
|
'native.plans.assistant': 'Асистент ШІ',
|
||||||
'native.plans.mailImport': 'Автоматичний імпорт листів',
|
'native.plans.mailImport': 'Автоматичний імпорт листів',
|
||||||
'native.plans.aiLabel': 'Документи ШІ',
|
'native.plans.aiLabel': 'Документи ШІ',
|
||||||
'native.plans.choose': 'Обрати: {trip}',
|
'native.plans.choose': 'Обрати: {plan}',
|
||||||
'native.plans.termsShort': 'Умови використання (EULA)',
|
'native.plans.termsShort': 'Умови використання (EULA)',
|
||||||
'native.plans.privacyShort': 'Конфіденційність',
|
'native.plans.privacyShort': 'Конфіденційність',
|
||||||
'native.plans.billing': 'Оплата',
|
'native.plans.billing': 'Оплата',
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
import type { TranslationStrings } from '../types';
|
import type { TranslationStrings } from '../types';
|
||||||
|
|
||||||
const native: TranslationStrings = {
|
const native: TranslationStrings = {
|
||||||
|
'native.trial.cancelApple':
|
||||||
|
'Để tránh bị tính phí, hãy hủy trong App Store ít nhất 24 giờ trước khi hết thời gian dùng thử.',
|
||||||
|
'native.trial.cancelPlay': 'Để tránh bị tính phí, hãy hủy trong Google Play trước khi hết thời gian dùng thử.',
|
||||||
|
'native.trial.badge': '7 ngày miễn phí',
|
||||||
|
'native.trial.price': '7 ngày miễn phí, sau đó {price} {period}.',
|
||||||
|
'native.trial.changed': 'Ưu đãi đã thay đổi. Hãy quay lại danh sách gói và kiểm tra giá hiện tại.',
|
||||||
'native.connect.title': 'Kết nối với TREK',
|
'native.connect.title': 'Kết nối với TREK',
|
||||||
'native.connect.hint': 'Nhập địa chỉ bạn dùng để mở TREK trong trình duyệt.',
|
'native.connect.hint': 'Nhập địa chỉ bạn dùng để mở TREK trong trình duyệt.',
|
||||||
'native.connect.placeholder': 'https://trek.example.com',
|
'native.connect.placeholder': 'https://trek.example.com',
|
||||||
@@ -66,7 +72,6 @@ const native: TranslationStrings = {
|
|||||||
'native.plans.legalAndroid':
|
'native.plans.legalAndroid':
|
||||||
'Khoản thanh toán được tính vào tài khoản Google của bạn khi xác nhận. Gói đăng ký tự động gia hạn trừ khi bạn hủy trước khi hết kỳ. Quản lý hoặc hủy trong Google Play tại Hồ sơ, Thanh toán và gói thuê bao, Gói thuê bao.',
|
'Khoản thanh toán được tính vào tài khoản Google của bạn khi xác nhận. Gói đăng ký tự động gia hạn trừ khi bạn hủy trước khi hết kỳ. Quản lý hoặc hủy trong Google Play tại Hồ sơ, Thanh toán và gói thuê bao, Gói thuê bao.',
|
||||||
'native.plans.restoreNoneAndroid': 'Không tìm thấy gói đăng ký đang hoạt động trên tài khoản Google này.',
|
'native.plans.restoreNoneAndroid': 'Không tìm thấy gói đăng ký đang hoạt động trên tài khoản Google này.',
|
||||||
'native.plans.recommended': 'Đề xuất',
|
|
||||||
'native.claim.change': 'Đổi',
|
'native.claim.change': 'Đổi',
|
||||||
'native.claim.ruleLength': 'ký tự',
|
'native.claim.ruleLength': 'ký tự',
|
||||||
'native.claim.ruleUpper': 'Chữ hoa',
|
'native.claim.ruleUpper': 'Chữ hoa',
|
||||||
@@ -193,28 +198,17 @@ const native: TranslationStrings = {
|
|||||||
'native.welcome.photosTitle': 'Ảnh và sách ảnh',
|
'native.welcome.photosTitle': 'Ảnh và sách ảnh',
|
||||||
'native.welcome.photosSub': 'Kỷ niệm ở lại cùng chuyến đi',
|
'native.welcome.photosSub': 'Kỷ niệm ở lại cùng chuyến đi',
|
||||||
'native.welcome.discover': 'Khám phá các gói cloud',
|
'native.welcome.discover': 'Khám phá các gói cloud',
|
||||||
'native.trip.start.title': 'Chuyến cuối tuần',
|
|
||||||
'native.trip.start.text': 'Chuyến đi ngắn, chủ yếu lên kế hoạch.',
|
|
||||||
'native.trip.basis.title': 'Chuyến đi vòng',
|
|
||||||
'native.trip.basis.text': 'Nhiều điểm dừng, đặt chỗ tự động.',
|
|
||||||
'native.trip.plus.title': 'Chuyến đi lớn',
|
|
||||||
'native.trip.plus.text': 'Hàng tuần trên đường, cùng cả nhóm.',
|
|
||||||
'native.trip.pro.title': 'Người du lịch vòng quanh thế giới',
|
|
||||||
'native.trip.pro.text': 'Cho người hay đi và sách ảnh lớn.',
|
|
||||||
'native.plans.unlimited': 'Không giới hạn',
|
'native.plans.unlimited': 'Không giới hạn',
|
||||||
'native.plans.unlimitedSub': 'Chuyến đi và bạn đồng hành',
|
'native.plans.unlimitedSub': 'Chuyến đi và bạn đồng hành',
|
||||||
'native.plans.inEveryPlan': 'trong mọi gói',
|
|
||||||
'native.plans.yearlyIs': '{price} mỗi năm, hủy bất cứ lúc nào',
|
'native.plans.yearlyIs': '{price} mỗi năm, hủy bất cứ lúc nào',
|
||||||
'native.plans.monthlyIs': 'Tức là {price} mỗi tháng',
|
'native.plans.monthlyIs': 'Tức là {price} mỗi tháng',
|
||||||
'native.plans.storageFairUse': 'Dung lượng theo chính sách sử dụng hợp lý',
|
'native.plans.storage': 'Lưu trữ',
|
||||||
'native.plans.aiPerMonth': '{n} / tháng',
|
'native.plans.notIncluded': 'Không bao gồm',
|
||||||
'native.plans.aiNone': 'Không bao gồm',
|
|
||||||
'native.plans.included': 'Đã bao gồm',
|
'native.plans.included': 'Đã bao gồm',
|
||||||
'native.plans.planned': 'Dự kiến',
|
|
||||||
'native.plans.assistant': 'Trợ lý AI',
|
'native.plans.assistant': 'Trợ lý AI',
|
||||||
'native.plans.mailImport': 'Tự động nhập email',
|
'native.plans.mailImport': 'Tự động nhập email',
|
||||||
'native.plans.aiLabel': 'Tài liệu AI',
|
'native.plans.aiLabel': 'Tài liệu AI',
|
||||||
'native.plans.choose': 'Chọn {trip}',
|
'native.plans.choose': 'Chọn {plan}',
|
||||||
'native.plans.termsShort': 'Điều khoản sử dụng (EULA)',
|
'native.plans.termsShort': 'Điều khoản sử dụng (EULA)',
|
||||||
'native.plans.privacyShort': 'Quyền riêng tư',
|
'native.plans.privacyShort': 'Quyền riêng tư',
|
||||||
'native.plans.billing': 'Thanh toán',
|
'native.plans.billing': 'Thanh toán',
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
import type { TranslationStrings } from '../types';
|
import type { TranslationStrings } from '../types';
|
||||||
|
|
||||||
const native: TranslationStrings = {
|
const native: TranslationStrings = {
|
||||||
|
'native.trial.cancelApple': '若要避免扣款,請在試用期結束至少 24 小時前到 App Store 取消訂閱。',
|
||||||
|
'native.trial.cancelPlay': '若要避免扣款,請在試用期結束前到 Google Play 取消訂閱。',
|
||||||
|
'native.trial.badge': '免費試用 7 天',
|
||||||
|
'native.trial.price': '免費試用 7 天,之後{period} {price}。',
|
||||||
|
'native.trial.changed': '優惠已有變更。請返回方案列表,查看目前的價格。',
|
||||||
'native.connect.title': '連線到 TREK',
|
'native.connect.title': '連線到 TREK',
|
||||||
'native.connect.hint': '請輸入你在瀏覽器中開啟 TREK 時使用的網址。',
|
'native.connect.hint': '請輸入你在瀏覽器中開啟 TREK 時使用的網址。',
|
||||||
'native.connect.placeholder': 'https://trek.example.com',
|
'native.connect.placeholder': 'https://trek.example.com',
|
||||||
@@ -61,7 +66,6 @@ const native: TranslationStrings = {
|
|||||||
'native.plans.legalAndroid':
|
'native.plans.legalAndroid':
|
||||||
'確認後將從你的 Google 帳號扣款。除非你在期滿前取消,訂閱會自動續訂。可在 Google Play 的「個人資料」「付款和訂閱」「訂閱」中管理或取消。',
|
'確認後將從你的 Google 帳號扣款。除非你在期滿前取消,訂閱會自動續訂。可在 Google Play 的「個人資料」「付款和訂閱」「訂閱」中管理或取消。',
|
||||||
'native.plans.restoreNoneAndroid': '此 Google 帳號沒有有效的訂閱。',
|
'native.plans.restoreNoneAndroid': '此 Google 帳號沒有有效的訂閱。',
|
||||||
'native.plans.recommended': '推薦',
|
|
||||||
'native.claim.change': '更改',
|
'native.claim.change': '更改',
|
||||||
'native.claim.ruleLength': '個字元',
|
'native.claim.ruleLength': '個字元',
|
||||||
'native.claim.ruleUpper': '大寫字母',
|
'native.claim.ruleUpper': '大寫字母',
|
||||||
@@ -181,28 +185,17 @@ const native: TranslationStrings = {
|
|||||||
'native.welcome.photosTitle': '照片和相簿',
|
'native.welcome.photosTitle': '照片和相簿',
|
||||||
'native.welcome.photosSub': '回憶和旅程留在一起',
|
'native.welcome.photosSub': '回憶和旅程留在一起',
|
||||||
'native.welcome.discover': '了解雲端方案',
|
'native.welcome.discover': '了解雲端方案',
|
||||||
'native.trip.start.title': '週末旅行',
|
|
||||||
'native.trip.start.text': '短途旅行,以規劃為主。',
|
|
||||||
'native.trip.basis.title': '環狀旅行',
|
|
||||||
'native.trip.basis.text': '多個地點,預訂自動整理。',
|
|
||||||
'native.trip.plus.title': '長途旅行',
|
|
||||||
'native.trip.plus.text': '數週在路上,和整個團隊一起。',
|
|
||||||
'native.trip.pro.title': '環球旅人',
|
|
||||||
'native.trip.pro.text': '適合常出遊的人和大型相簿。',
|
|
||||||
'native.plans.unlimited': '無限制',
|
'native.plans.unlimited': '無限制',
|
||||||
'native.plans.unlimitedSub': '旅行和同行者',
|
'native.plans.unlimitedSub': '旅行和同行者',
|
||||||
'native.plans.inEveryPlan': '每個方案都有',
|
|
||||||
'native.plans.yearlyIs': '每年 {price},隨時可取消',
|
'native.plans.yearlyIs': '每年 {price},隨時可取消',
|
||||||
'native.plans.monthlyIs': '相當於每月 {price}',
|
'native.plans.monthlyIs': '相當於每月 {price}',
|
||||||
'native.plans.storageFairUse': '公平使用儲存空間',
|
'native.plans.storage': '儲存',
|
||||||
'native.plans.aiPerMonth': '{n} / 月',
|
'native.plans.notIncluded': '不包含',
|
||||||
'native.plans.aiNone': '不包含',
|
|
||||||
'native.plans.included': '已包含',
|
'native.plans.included': '已包含',
|
||||||
'native.plans.planned': '計畫推出',
|
|
||||||
'native.plans.assistant': 'AI 助理',
|
'native.plans.assistant': 'AI 助理',
|
||||||
'native.plans.mailImport': '自動郵件匯入',
|
'native.plans.mailImport': '自動郵件匯入',
|
||||||
'native.plans.aiLabel': 'AI 文件',
|
'native.plans.aiLabel': 'AI 文件',
|
||||||
'native.plans.choose': '選擇{trip}',
|
'native.plans.choose': '選擇{plan}',
|
||||||
'native.plans.termsShort': '使用條款 (EULA)',
|
'native.plans.termsShort': '使用條款 (EULA)',
|
||||||
'native.plans.privacyShort': '隱私',
|
'native.plans.privacyShort': '隱私',
|
||||||
'native.plans.billing': '付款',
|
'native.plans.billing': '付款',
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
import type { TranslationStrings } from '../types';
|
import type { TranslationStrings } from '../types';
|
||||||
|
|
||||||
const native: TranslationStrings = {
|
const native: TranslationStrings = {
|
||||||
|
'native.trial.cancelApple': '若要避免扣费,请在试用期结束至少 24 小时前到 App Store 取消订阅。',
|
||||||
|
'native.trial.cancelPlay': '若要避免扣费,请在试用期结束前到 Google Play 取消订阅。',
|
||||||
|
'native.trial.badge': '免费试用 7 天',
|
||||||
|
'native.trial.price': '免费试用 7 天,之后{period} {price}。',
|
||||||
|
'native.trial.changed': '优惠已变更。请返回套餐列表,查看当前价格。',
|
||||||
'native.connect.title': '连接到 TREK',
|
'native.connect.title': '连接到 TREK',
|
||||||
'native.connect.hint': '请输入你在浏览器中打开 TREK 时使用的地址。',
|
'native.connect.hint': '请输入你在浏览器中打开 TREK 时使用的地址。',
|
||||||
'native.connect.placeholder': 'https://trek.example.com',
|
'native.connect.placeholder': 'https://trek.example.com',
|
||||||
@@ -60,7 +65,6 @@ const native: TranslationStrings = {
|
|||||||
'native.plans.legalAndroid':
|
'native.plans.legalAndroid':
|
||||||
'确认后将从你的 Google 账号扣款。除非你在期满前取消,订阅会自动续订。可在 Google Play 的“个人资料”“付款和订阅”“订阅”中管理或取消。',
|
'确认后将从你的 Google 账号扣款。除非你在期满前取消,订阅会自动续订。可在 Google Play 的“个人资料”“付款和订阅”“订阅”中管理或取消。',
|
||||||
'native.plans.restoreNoneAndroid': '此 Google 账号没有有效订阅。',
|
'native.plans.restoreNoneAndroid': '此 Google 账号没有有效订阅。',
|
||||||
'native.plans.recommended': '推荐',
|
|
||||||
'native.claim.change': '更改',
|
'native.claim.change': '更改',
|
||||||
'native.claim.ruleLength': '个字符',
|
'native.claim.ruleLength': '个字符',
|
||||||
'native.claim.ruleUpper': '大写字母',
|
'native.claim.ruleUpper': '大写字母',
|
||||||
@@ -180,28 +184,17 @@ const native: TranslationStrings = {
|
|||||||
'native.welcome.photosTitle': '照片和相册',
|
'native.welcome.photosTitle': '照片和相册',
|
||||||
'native.welcome.photosSub': '回忆和旅程留在一起',
|
'native.welcome.photosSub': '回忆和旅程留在一起',
|
||||||
'native.welcome.discover': '了解云端方案',
|
'native.welcome.discover': '了解云端方案',
|
||||||
'native.trip.start.title': '周末游',
|
|
||||||
'native.trip.start.text': '短途旅行,以规划为主。',
|
|
||||||
'native.trip.basis.title': '环线旅行',
|
|
||||||
'native.trip.basis.text': '多个地点,预订自动整理。',
|
|
||||||
'native.trip.plus.title': '长途旅行',
|
|
||||||
'native.trip.plus.text': '数周在路上,和整个团队一起。',
|
|
||||||
'native.trip.pro.title': '环球旅行者',
|
|
||||||
'native.trip.pro.text': '适合常出行的人和大型相册。',
|
|
||||||
'native.plans.unlimited': '不限',
|
'native.plans.unlimited': '不限',
|
||||||
'native.plans.unlimitedSub': '旅行和同行者',
|
'native.plans.unlimitedSub': '旅行和同行者',
|
||||||
'native.plans.inEveryPlan': '每个方案都有',
|
|
||||||
'native.plans.yearlyIs': '每年 {price},随时可取消',
|
'native.plans.yearlyIs': '每年 {price},随时可取消',
|
||||||
'native.plans.monthlyIs': '相当于每月 {price}',
|
'native.plans.monthlyIs': '相当于每月 {price}',
|
||||||
'native.plans.storageFairUse': '公平使用存储空间',
|
'native.plans.storage': '存储',
|
||||||
'native.plans.aiPerMonth': '{n} / 月',
|
'native.plans.notIncluded': '不包含',
|
||||||
'native.plans.aiNone': '不包含',
|
|
||||||
'native.plans.included': '已包含',
|
'native.plans.included': '已包含',
|
||||||
'native.plans.planned': '计划推出',
|
|
||||||
'native.plans.assistant': 'AI 助手',
|
'native.plans.assistant': 'AI 助手',
|
||||||
'native.plans.mailImport': '自动邮件导入',
|
'native.plans.mailImport': '自动邮件导入',
|
||||||
'native.plans.aiLabel': 'AI 文档',
|
'native.plans.aiLabel': 'AI 文档',
|
||||||
'native.plans.choose': '选择{trip}',
|
'native.plans.choose': '选择{plan}',
|
||||||
'native.plans.termsShort': '使用条款 (EULA)',
|
'native.plans.termsShort': '使用条款 (EULA)',
|
||||||
'native.plans.privacyShort': '隐私',
|
'native.plans.privacyShort': '隐私',
|
||||||
'native.plans.billing': '付款',
|
'native.plans.billing': '付款',
|
||||||
|
|||||||
@@ -315,7 +315,7 @@ export const accommodationCreateBodySchema = accommodationCreateRequestSchema.pa
|
|||||||
});
|
});
|
||||||
export type AccommodationCreateBody = z.infer<typeof accommodationCreateBodySchema>;
|
export type AccommodationCreateBody = z.infer<typeof accommodationCreateBodySchema>;
|
||||||
|
|
||||||
export const accommodationUpdateRequestSchema = open.and(accommodationCreateRequestSchema.pick({ confirmation: true }));
|
export const accommodationUpdateRequestSchema = open;
|
||||||
export type AccommodationUpdateRequest = z.infer<typeof accommodationUpdateRequestSchema>;
|
export type AccommodationUpdateRequest = z.infer<typeof accommodationUpdateRequestSchema>;
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user