@andco/protocol 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -73
- package/dist/api-errors.d.ts +40 -6
- package/dist/api-errors.d.ts.map +1 -1
- package/dist/api-errors.js +38 -6
- package/dist/consent.d.ts +2 -2
- package/dist/consent.d.ts.map +1 -1
- package/dist/consent.js +10 -19
- package/dist/errors.d.ts +41 -7
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +46 -8
- package/dist/format-money.d.ts +3 -0
- package/dist/format-money.d.ts.map +1 -0
- package/dist/format-money.js +7 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/intent-input.d.ts +134 -126
- package/dist/intent-input.d.ts.map +1 -1
- package/dist/intent-input.js +26 -16
- package/dist/intent-status.d.ts +24 -0
- package/dist/intent-status.d.ts.map +1 -0
- package/dist/intent-status.js +37 -0
- package/dist/miniapp-icon.d.ts +2 -2
- package/dist/miniapp-icon.d.ts.map +1 -1
- package/dist/miniapp-icon.js +6 -58
- package/dist/native-intent.d.ts +24 -33
- package/dist/native-intent.d.ts.map +1 -1
- package/dist/native-intent.js +19 -60
- package/dist/pagination.d.ts +71 -0
- package/dist/pagination.d.ts.map +1 -0
- package/dist/pagination.js +63 -0
- package/dist/rar/account-matchers.d.ts +52 -52
- package/dist/rar/account-matchers.d.ts.map +1 -1
- package/dist/rar/account-matchers.js +81 -72
- package/dist/rar/bank.d.ts +86 -84
- package/dist/rar/bank.d.ts.map +1 -1
- package/dist/rar/bank.js +26 -24
- package/dist/rar/catalog.d.ts +57 -56
- package/dist/rar/catalog.d.ts.map +1 -1
- package/dist/rar/catalog.js +1 -0
- package/dist/rar/detail.d.ts +1 -1
- package/dist/rar/detail.d.ts.map +1 -1
- package/dist/rar/detail.js +1 -1
- package/dist/service-grants.d.ts +4 -2
- package/dist/service-grants.d.ts.map +1 -1
- package/dist/service-grants.js +15 -2
- package/dist/transport/financial-events.d.ts +10 -22
- package/dist/transport/financial-events.d.ts.map +1 -1
- package/dist/transport/financial-events.js +36 -62
- package/dist/transport/generated/oauth-api.d.ts +297 -103
- package/dist/transport/generated/oauth-api.d.ts.map +1 -1
- package/dist/transport/intents.d.ts +11 -10
- package/dist/transport/intents.d.ts.map +1 -1
- package/dist/transport/intents.js +22 -21
- package/dist/transport/rest.d.ts +7 -4
- package/dist/transport/rest.d.ts.map +1 -1
- package/dist/transport/rest.js +1 -1
- package/dist/transport/runtime.js +3 -3
- package/dist/utils.js +3 -3
- package/dist/webhooks.d.ts +15 -4
- package/dist/webhooks.d.ts.map +1 -1
- package/dist/webhooks.js +50 -17
- package/package.json +1 -1
- package/dist/native-copy.d.ts +0 -28
- package/dist/native-copy.d.ts.map +0 -1
- package/dist/native-copy.js +0 -400
package/dist/webhooks.d.ts
CHANGED
|
@@ -10,6 +10,11 @@ export declare const ANDCO_WEBHOOK_ALGORITHM: "Ed25519";
|
|
|
10
10
|
export declare const ANDCO_WEBHOOK_TOLERANCE_SECONDS = 300;
|
|
11
11
|
/** Andco's public webhook keys. Platform serves the same document at its own origin. */
|
|
12
12
|
export declare const ANDCO_WEBHOOK_JWKS_URL: "https://api.andco.com/.well-known/webhook-keys.json";
|
|
13
|
+
/**
|
|
14
|
+
* How long a fetched JWKS is trusted, in milliseconds. Past it, the next delivery reloads the keys
|
|
15
|
+
* even when its `kid` is known, so a key Andco withdrew stops verifying.
|
|
16
|
+
*/
|
|
17
|
+
export declare const ANDCO_WEBHOOK_KEYS_TTL_MS: number;
|
|
13
18
|
/**
|
|
14
19
|
* The exact string Andco signs for one delivery: `${eventId}.${timestamp}.${rawBody}`.
|
|
15
20
|
*
|
|
@@ -156,6 +161,11 @@ export type AndcoWebhookVerifierOptions = {
|
|
|
156
161
|
toleranceSeconds?: number;
|
|
157
162
|
/** Fetch used for the JWKS. Defaults to the global `fetch`. */
|
|
158
163
|
fetch?: typeof fetch;
|
|
164
|
+
/**
|
|
165
|
+
* How long fetched keys are trusted, in milliseconds, before a delivery reloads them. If the reload
|
|
166
|
+
* fails, a still-cached key keeps verifying. Defaults to {@link ANDCO_WEBHOOK_KEYS_TTL_MS}.
|
|
167
|
+
*/
|
|
168
|
+
keysTtlMs?: number;
|
|
159
169
|
/** Current Unix time in seconds, for tests. */
|
|
160
170
|
now?: () => number;
|
|
161
171
|
};
|
|
@@ -178,8 +188,9 @@ declare function isGrantEvent(event: AndcoWebhookEvent): event is AndcoGrantWebh
|
|
|
178
188
|
*
|
|
179
189
|
* Andco signs `${eventId}.${timestamp}.${rawBody}` with an Ed25519 key it owns and names the key by
|
|
180
190
|
* `kid` in `andco-signature`. The verifier fetches Andco's public JWKS once, caches every key by
|
|
181
|
-
* `kid`, and refetches
|
|
182
|
-
*
|
|
191
|
+
* `kid`, and refetches when a delivery names a `kid` it has not seen or the cache is older than
|
|
192
|
+
* {@link ANDCO_WEBHOOK_KEYS_TTL_MS}. Each fetch replaces the key set, so Andco rotates and withdraws keys
|
|
193
|
+
* without any change on the receiver. Fetch attempts are rate-limited, failed ones included. Verification uses Web Crypto only, so it runs on Node,
|
|
183
194
|
* Deno, Bun, Cloudflare Workers and edge runtimes alike.
|
|
184
195
|
*
|
|
185
196
|
* The returned function throws {@link AndcoWebhookError} when a header is missing, the timestamp is
|
|
@@ -203,8 +214,8 @@ declare function isGrantEvent(event: AndcoWebhookEvent): event is AndcoGrantWebh
|
|
|
203
214
|
*
|
|
204
215
|
* @example
|
|
205
216
|
* ```ts
|
|
206
|
-
* // Node http,
|
|
207
|
-
* const verify = andcoWebhooks.verifier(
|
|
217
|
+
* // Node http, preserving the signed raw body
|
|
218
|
+
* const verify = andcoWebhooks.verifier();
|
|
208
219
|
* const event = await verify({ body: rawBody, headers: request.headers });
|
|
209
220
|
* ```
|
|
210
221
|
*/
|
package/dist/webhooks.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.d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AAG,CAAC;IACvB,6FAA6F;IAC7F,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,+DAA+D;IAC/D,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+CAA+C;IAC/C,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB,CAAC;AAEF,wFAAwF;AACxF,MAAM,MAAM,kBAAkB,GAAG,CAAC,QAAQ,EAAE,OAAO,GAAG,oBAAoB,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC;AA+C1G;;;;;;;;;;GAUG;AACH,iBAAS,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,KAAK,IAAI,sBAAsB,CAE/E;AAuBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,iBAAS,QAAQ,CAAC,OAAO,GAAE,2BAAgC,GAAG,kBAAkB,CAyH/E;AAED;;;;;GAKG;AACH,eAAO,MAAM,aAAa;;;CAAsC,CAAC"}
|
package/dist/webhooks.js
CHANGED
|
@@ -11,6 +11,11 @@ export const ANDCO_WEBHOOK_ALGORITHM = "Ed25519";
|
|
|
11
11
|
export const ANDCO_WEBHOOK_TOLERANCE_SECONDS = 300;
|
|
12
12
|
/** Andco's public webhook keys. Platform serves the same document at its own origin. */
|
|
13
13
|
export const ANDCO_WEBHOOK_JWKS_URL = `${ANDCO_API_ORIGIN}/.well-known/webhook-keys.json`;
|
|
14
|
+
/**
|
|
15
|
+
* How long a fetched JWKS is trusted, in milliseconds. Past it, the next delivery reloads the keys
|
|
16
|
+
* even when its `kid` is known, so a key Andco withdrew stops verifying.
|
|
17
|
+
*/
|
|
18
|
+
export const ANDCO_WEBHOOK_KEYS_TTL_MS = 60 * 60_000;
|
|
14
19
|
/**
|
|
15
20
|
* The exact string Andco signs for one delivery: `${eventId}.${timestamp}.${rawBody}`.
|
|
16
21
|
*
|
|
@@ -74,7 +79,7 @@ export class AndcoWebhookError extends Error {
|
|
|
74
79
|
/** The Grant lifecycle event types the verifier checks and types. */
|
|
75
80
|
export const ANDCO_WEBHOOK_GRANT_EVENT_TYPES = ["grant.revoked", "grant.expired", "grant.updated"];
|
|
76
81
|
const SIGNATURE_HEADER = /^\s*kid=([A-Za-z0-9._:-]{1,128})\s*,\s*alg=([A-Za-z0-9]+)\s*,\s*sig=([A-Za-z0-9_-]+)\s*$/;
|
|
77
|
-
/**
|
|
82
|
+
/** JWKS fetch attempts, successful or not, are at most one per this interval, so forged kids cannot flood Andco. */
|
|
78
83
|
const UNKNOWN_KID_REFRESH_MS = 60_000;
|
|
79
84
|
function headerOf(headers, name) {
|
|
80
85
|
if (typeof headers.get === "function")
|
|
@@ -154,8 +159,9 @@ function hasLifecyclePayload(event) {
|
|
|
154
159
|
*
|
|
155
160
|
* Andco signs `${eventId}.${timestamp}.${rawBody}` with an Ed25519 key it owns and names the key by
|
|
156
161
|
* `kid` in `andco-signature`. The verifier fetches Andco's public JWKS once, caches every key by
|
|
157
|
-
* `kid`, and refetches
|
|
158
|
-
*
|
|
162
|
+
* `kid`, and refetches when a delivery names a `kid` it has not seen or the cache is older than
|
|
163
|
+
* {@link ANDCO_WEBHOOK_KEYS_TTL_MS}. Each fetch replaces the key set, so Andco rotates and withdraws keys
|
|
164
|
+
* without any change on the receiver. Fetch attempts are rate-limited, failed ones included. Verification uses Web Crypto only, so it runs on Node,
|
|
159
165
|
* Deno, Bun, Cloudflare Workers and edge runtimes alike.
|
|
160
166
|
*
|
|
161
167
|
* The returned function throws {@link AndcoWebhookError} when a header is missing, the timestamp is
|
|
@@ -179,8 +185,8 @@ function hasLifecyclePayload(event) {
|
|
|
179
185
|
*
|
|
180
186
|
* @example
|
|
181
187
|
* ```ts
|
|
182
|
-
* // Node http,
|
|
183
|
-
* const verify = andcoWebhooks.verifier(
|
|
188
|
+
* // Node http, preserving the signed raw body
|
|
189
|
+
* const verify = andcoWebhooks.verifier();
|
|
184
190
|
* const event = await verify({ body: rawBody, headers: request.headers });
|
|
185
191
|
* ```
|
|
186
192
|
*/
|
|
@@ -188,9 +194,11 @@ function verifier(options = {}) {
|
|
|
188
194
|
const jwksUrl = String(options.jwksUrl ?? ANDCO_WEBHOOK_JWKS_URL);
|
|
189
195
|
const tolerance = options.toleranceSeconds ?? ANDCO_WEBHOOK_TOLERANCE_SECONDS;
|
|
190
196
|
const now = options.now ?? (() => Math.floor(Date.now() / 1000));
|
|
191
|
-
const
|
|
197
|
+
const ttl = options.keysTtlMs ?? ANDCO_WEBHOOK_KEYS_TTL_MS;
|
|
198
|
+
let keys = new Map();
|
|
192
199
|
let loading;
|
|
193
200
|
let loadedAt = Number.NEGATIVE_INFINITY;
|
|
201
|
+
let attemptedAt = Number.NEGATIVE_INFINITY;
|
|
194
202
|
async function load() {
|
|
195
203
|
const fetchImpl = options.fetch ?? globalThis.fetch;
|
|
196
204
|
let response;
|
|
@@ -207,33 +215,58 @@ function verifier(options = {}) {
|
|
|
207
215
|
if (!Array.isArray(entries)) {
|
|
208
216
|
throw new AndcoWebhookError(ANDCO_WEBHOOK_ERROR_CODES.JWKS_UNAVAILABLE, `${jwksUrl} answered ${response.status} without a JWKS`);
|
|
209
217
|
}
|
|
210
|
-
|
|
218
|
+
// Replace, never merge: a kid Andco withdrew must stop verifying.
|
|
219
|
+
const next = new Map();
|
|
211
220
|
for (const entry of entries) {
|
|
212
221
|
if (entry?.kty !== "OKP" || entry.crv !== "Ed25519" || typeof entry.x !== "string")
|
|
213
222
|
continue;
|
|
214
|
-
if (typeof entry.kid !== "string" ||
|
|
223
|
+
if (typeof entry.kid !== "string" || next.has(entry.kid))
|
|
224
|
+
continue;
|
|
225
|
+
const kid = entry.kid;
|
|
226
|
+
const x = entry.x;
|
|
227
|
+
const previous = keys.get(kid);
|
|
228
|
+
if (previous && previous.x === x) {
|
|
229
|
+
next.set(kid, previous);
|
|
215
230
|
continue;
|
|
216
|
-
|
|
217
|
-
const key = crypto.subtle.importKey("jwk",
|
|
218
|
-
|
|
219
|
-
|
|
231
|
+
}
|
|
232
|
+
const key = crypto.subtle.importKey("jwk", { kty: "OKP", crv: "Ed25519", x }, { name: "Ed25519" }, false, [
|
|
233
|
+
"verify",
|
|
234
|
+
]);
|
|
235
|
+
key.catch(() => {
|
|
236
|
+
if (keys.get(kid)?.key === key)
|
|
237
|
+
keys.delete(kid);
|
|
238
|
+
});
|
|
239
|
+
next.set(kid, { x, key });
|
|
220
240
|
}
|
|
241
|
+
keys = next;
|
|
242
|
+
loadedAt = Date.now();
|
|
221
243
|
console.debug("[andcoWebhooks.verifier] loaded %s webhook keys from %s", keys.size, jwksUrl);
|
|
222
244
|
}
|
|
223
245
|
async function keyFor(kid) {
|
|
224
246
|
const cached = keys.get(kid);
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
if (
|
|
247
|
+
const current = Date.now();
|
|
248
|
+
const expired = current - loadedAt >= ttl;
|
|
249
|
+
if (cached && !expired)
|
|
250
|
+
return cached.key;
|
|
251
|
+
if (current - attemptedAt >= UNKNOWN_KID_REFRESH_MS) {
|
|
252
|
+
attemptedAt = current;
|
|
228
253
|
loading ??= load().finally(() => {
|
|
229
254
|
loading = undefined;
|
|
230
255
|
});
|
|
231
256
|
}
|
|
232
|
-
|
|
257
|
+
try {
|
|
258
|
+
await loading;
|
|
259
|
+
}
|
|
260
|
+
catch (error) {
|
|
261
|
+
if (!cached)
|
|
262
|
+
throw error;
|
|
263
|
+
console.debug("[andcoWebhooks.verifier] reload failed, verifying %s with its cached key: %o", kid, error);
|
|
264
|
+
return cached.key;
|
|
265
|
+
}
|
|
233
266
|
const loaded = keys.get(kid);
|
|
234
267
|
if (!loaded)
|
|
235
268
|
throw new AndcoWebhookError(ANDCO_WEBHOOK_ERROR_CODES.UNKNOWN_KEY, `Unknown webhook key ${kid}`);
|
|
236
|
-
return loaded;
|
|
269
|
+
return loaded.key;
|
|
237
270
|
}
|
|
238
271
|
return async function verify(delivery) {
|
|
239
272
|
let body;
|
package/package.json
CHANGED
package/dist/native-copy.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/** Selects the supported language while preserving Platform's Spanish fallback. */
|
|
2
|
-
export declare function ANDCO_NATIVE_LOCALE(language?: string): "es" | "en" | "pt";
|
|
3
|
-
/** Formats CLP on Hermes without BigInt coercion or rounding unsafe integers. */
|
|
4
|
-
export declare function ANDCO_NATIVE_MONEY(value: string, locale?: "es" | "en" | "pt"): string;
|
|
5
|
-
/**
|
|
6
|
-
* Formats a monetary string Andco returned, in any currency and locale, guarding the same way
|
|
7
|
-
* {@link ANDCO_NATIVE_MONEY} does against a value that would silently lose precision going through
|
|
8
|
-
* `Number()`. Every consumer that renders an Andco balance or amount as a string -- example apps
|
|
9
|
-
* included -- should format through this function instead of re-implementing the guard, or skipping
|
|
10
|
-
* it, on its own.
|
|
11
|
-
*/
|
|
12
|
-
export declare function ANDCO_FORMAT_MONEY(value: string, currency: string, locale?: string): string;
|
|
13
|
-
/** Native equivalents of Platform's localized labels; server-owned resource descriptions remain unchanged. */
|
|
14
|
-
export declare function ANDCO_NATIVE_TEXT(text: string, values?: Record<string, string | number>, locale?: "es" | "en" | "pt"): string;
|
|
15
|
-
/**
|
|
16
|
-
* Untranslated copy keys that vary only by Intent type, shared by every native renderer.
|
|
17
|
-
*
|
|
18
|
-
* Every consumer -- {@link ANDCO_NATIVE_INTENT_VIEW} and both platform Intent drawers -- reads this
|
|
19
|
-
* record instead of re-deriving the same three-way branch with its own chain of ternaries. Each
|
|
20
|
-
* value is a key into {@link ANDCO_NATIVE_TEXT}'s copy table, so callers still translate it with
|
|
21
|
-
* `ANDCO_NATIVE_TEXT(...)` at the point where it is rendered.
|
|
22
|
-
*/
|
|
23
|
-
export declare const ANDCO_NATIVE_INTENT_TYPE_COPY: Record<"deposit" | "transfer", {
|
|
24
|
-
title: string;
|
|
25
|
-
amountLabel: string;
|
|
26
|
-
destinationLabel: string;
|
|
27
|
-
}>;
|
|
28
|
-
//# sourceMappingURL=native-copy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"native-copy.d.ts","sourceRoot":"","sources":["../src/native-copy.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,wBAAgB,mBAAmB,CAAC,QAAQ,SAAiD,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAGjH;AACD,iFAAiF;AACjF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAwB,UAE/E;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,SAAU,GAAG,MAAM,CAI5F;AAED,8GAA8G;AAC9G,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EACZ,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAM,EAC5C,MAAM,qBAAwB,UAK/B;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,6BAA6B,EAAE,MAAM,CAChD,SAAS,GAAG,UAAU,EACtB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAA;CAAE,CAYjE,CAAC"}
|
package/dist/native-copy.js
DELETED
|
@@ -1,400 +0,0 @@
|
|
|
1
|
-
/** Selects the supported language while preserving Platform's Spanish fallback. */
|
|
2
|
-
export function ANDCO_NATIVE_LOCALE(language = Intl.DateTimeFormat().resolvedOptions().locale) {
|
|
3
|
-
const prefix = language.split(/[-_]/)[0];
|
|
4
|
-
return prefix === "en" || prefix === "pt" ? prefix : "es";
|
|
5
|
-
}
|
|
6
|
-
/** Formats CLP on Hermes without BigInt coercion or rounding unsafe integers. */
|
|
7
|
-
export function ANDCO_NATIVE_MONEY(value, locale = ANDCO_NATIVE_LOCALE()) {
|
|
8
|
-
return ANDCO_FORMAT_MONEY(value, "CLP", locale === "es" ? "es-CL" : locale);
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Formats a monetary string Andco returned, in any currency and locale, guarding the same way
|
|
12
|
-
* {@link ANDCO_NATIVE_MONEY} does against a value that would silently lose precision going through
|
|
13
|
-
* `Number()`. Every consumer that renders an Andco balance or amount as a string -- example apps
|
|
14
|
-
* included -- should format through this function instead of re-implementing the guard, or skipping
|
|
15
|
-
* it, on its own.
|
|
16
|
-
*/
|
|
17
|
-
export function ANDCO_FORMAT_MONEY(value, currency, locale = "es-CL") {
|
|
18
|
-
const amount = Number(value);
|
|
19
|
-
if (!Number.isSafeInteger(amount))
|
|
20
|
-
return `${value} ${currency}`;
|
|
21
|
-
return new Intl.NumberFormat(locale, { style: "currency", currency, maximumFractionDigits: 0 }).format(amount);
|
|
22
|
-
}
|
|
23
|
-
/** Native equivalents of Platform's localized labels; server-owned resource descriptions remain unchanged. */
|
|
24
|
-
export function ANDCO_NATIVE_TEXT(text, values = {}, locale = ANDCO_NATIVE_LOCALE()) {
|
|
25
|
-
const row = COPY[text];
|
|
26
|
-
const translated = row ? row[locale === "en" ? 0 : locale === "pt" ? 1 : 2] : text;
|
|
27
|
-
return translated.replace(/\{\{(\w+)\}\}/g, (match, key) => String(values[key] ?? match));
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Untranslated copy keys that vary only by Intent type, shared by every native renderer.
|
|
31
|
-
*
|
|
32
|
-
* Every consumer -- {@link ANDCO_NATIVE_INTENT_VIEW} and both platform Intent drawers -- reads this
|
|
33
|
-
* record instead of re-deriving the same three-way branch with its own chain of ternaries. Each
|
|
34
|
-
* value is a key into {@link ANDCO_NATIVE_TEXT}'s copy table, so callers still translate it with
|
|
35
|
-
* `ANDCO_NATIVE_TEXT(...)` at the point where it is rendered.
|
|
36
|
-
*/
|
|
37
|
-
export const ANDCO_NATIVE_INTENT_TYPE_COPY = {
|
|
38
|
-
deposit: {
|
|
39
|
-
title: "Realizar un depósito",
|
|
40
|
-
amountLabel: "Monto a abonar (CLP)",
|
|
41
|
-
destinationLabel: "Cuenta de destino",
|
|
42
|
-
},
|
|
43
|
-
transfer: {
|
|
44
|
-
title: "Confirmar transferencia",
|
|
45
|
-
amountLabel: "Monto a transferir (CLP)",
|
|
46
|
-
destinationLabel: "Destino",
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
const COPY = {
|
|
50
|
-
"Aún no hay abonos registrados en esta cuenta.": [
|
|
51
|
-
"No credits have been recorded in this account yet.",
|
|
52
|
-
"Ainda não há créditos registrados nesta conta.",
|
|
53
|
-
"Aún no hay abonos registrados en esta cuenta.",
|
|
54
|
-
],
|
|
55
|
-
"La meta cambió mientras editabas. Descarta tus cambios y revisa el monto actualizado.": [
|
|
56
|
-
"The target changed while you were editing. Discard your changes and review the updated amount.",
|
|
57
|
-
"A meta mudou enquanto você editava. Descarte suas alterações e revise o valor atualizado.",
|
|
58
|
-
"La meta cambió mientras editabas. Descarta tus cambios y revisa el monto actualizado.",
|
|
59
|
-
],
|
|
60
|
-
"Meta del depósito en CLP": ["Deposit target in CLP", "Meta do depósito em CLP", "Meta del depósito en CLP"],
|
|
61
|
-
"Confirma la meta antes de abonar. Quedará fija al confirmar el primer aporte o asignar un abono.": [
|
|
62
|
-
"Confirm the target before funding. It becomes fixed when the first contribution is confirmed or a credit is assigned.",
|
|
63
|
-
"Confirme a meta antes de aportar. Ela ficará fixa ao confirmar o primeiro aporte ou atribuir um crédito.",
|
|
64
|
-
"Confirma la meta antes de abonar. Quedará fija al confirmar el primer aporte o asignar un abono.",
|
|
65
|
-
],
|
|
66
|
-
"Confirmar meta": ["Confirm target", "Confirmar meta", "Confirmar meta"],
|
|
67
|
-
"Meta fijada al iniciar el fondeo.": [
|
|
68
|
-
"Target fixed when funding started.",
|
|
69
|
-
"Meta fixada ao iniciar o aporte.",
|
|
70
|
-
"Meta fijada al iniciar el fondeo.",
|
|
71
|
-
],
|
|
72
|
-
"No pudimos cambiar la meta. Revisa el monto autorizado y actualiza si la solicitud cambió.": [
|
|
73
|
-
"We could not change the target. Check the authorized amount and refresh if the request changed.",
|
|
74
|
-
"Não foi possível alterar a meta. Verifique o valor autorizado e atualize se a solicitação mudou.",
|
|
75
|
-
"No pudimos cambiar la meta. Revisa el monto autorizado y actualiza si la solicitud cambió.",
|
|
76
|
-
],
|
|
77
|
-
"Cuenta confirmada": ["Confirmed account", "Conta confirmada", "Cuenta confirmada"],
|
|
78
|
-
"Revisa la operación pendiente antes de iniciar otra acción.": [
|
|
79
|
-
"Review the pending operation before starting another action.",
|
|
80
|
-
"Revise a operação pendente antes de iniciar outra ação.",
|
|
81
|
-
"Revisa la operación pendiente antes de iniciar otra acción.",
|
|
82
|
-
],
|
|
83
|
-
"Abonos no disponibles para esta solicitud ({{count}})": [
|
|
84
|
-
"Credits unavailable for this request ({{count}})",
|
|
85
|
-
"Créditos indisponíveis para esta solicitação ({{count}})",
|
|
86
|
-
"Abonos no disponibles para esta solicitud ({{count}})",
|
|
87
|
-
],
|
|
88
|
-
"Otras solicitudes abiertas en esta cuenta ({{count}})": [
|
|
89
|
-
"Other open requests for this account ({{count}})",
|
|
90
|
-
"Outras solicitações abertas nesta conta ({{count}})",
|
|
91
|
-
"Otras solicitudes abiertas en esta cuenta ({{count}})",
|
|
92
|
-
],
|
|
93
|
-
"Asignar abonos": ["Assign credits", "Atribuir créditos", "Asignar abonos"],
|
|
94
|
-
"Selecciona los abonos que corresponden a esta solicitud. Asignar o quitar un abono no mueve dinero de tu cuenta.": [
|
|
95
|
-
"Select the credits that belong to this request. Assigning or removing a credit does not move money from your account.",
|
|
96
|
-
"Selecione os créditos que correspondem a esta solicitação. Atribuir ou remover um crédito não movimenta dinheiro da sua conta.",
|
|
97
|
-
"Selecciona los abonos que corresponden a esta solicitud. Asignar o quitar un abono no mueve dinero de tu cuenta.",
|
|
98
|
-
],
|
|
99
|
-
"Asignar {{reference}}, {{amount}}": [
|
|
100
|
-
"Assign {{reference}}, {{amount}}",
|
|
101
|
-
"Atribuir {{reference}}, {{amount}}",
|
|
102
|
-
"Asignar {{reference}}, {{amount}}",
|
|
103
|
-
],
|
|
104
|
-
"Asignado a otra solicitud de {{project}}": [
|
|
105
|
-
"Assigned to another request from {{project}}",
|
|
106
|
-
"Atribuído a outra solicitação de {{project}}",
|
|
107
|
-
"Asignado a otra solicitud de {{project}}",
|
|
108
|
-
],
|
|
109
|
-
"otra aplicación": ["another application", "outro aplicativo", "otra aplicación"],
|
|
110
|
-
"Recibido antes de crear esta solicitud": [
|
|
111
|
-
"Received before this request was created",
|
|
112
|
-
"Recebido antes da criação desta solicitação",
|
|
113
|
-
"Recibido antes de crear esta solicitud",
|
|
114
|
-
],
|
|
115
|
-
"Revertido por el banco": ["Reversed by the bank", "Estornado pelo banco", "Revertido por el banco"],
|
|
116
|
-
"No disponible para esta solicitud": [
|
|
117
|
-
"Unavailable for this request",
|
|
118
|
-
"Indisponível para esta solicitação",
|
|
119
|
-
"No disponible para esta solicitud",
|
|
120
|
-
],
|
|
121
|
-
"Aún no hay abonos disponibles para asignar a esta solicitud.": [
|
|
122
|
-
"No credits are available to assign to this request yet.",
|
|
123
|
-
"Ainda não há créditos disponíveis para atribuir a esta solicitação.",
|
|
124
|
-
"Aún no hay abonos disponibles para asignar a esta solicitud.",
|
|
125
|
-
],
|
|
126
|
-
"Al confirmar, los abonos seleccionados dejarán de estar asignados a las otras solicitudes.": [
|
|
127
|
-
"Confirmation removes selected credits from the other requests.",
|
|
128
|
-
"Ao confirmar, os créditos selecionados deixarão de ser atribuídos às outras solicitações.",
|
|
129
|
-
"Al confirmar, los abonos seleccionados dejarán de estar asignados a las otras solicitudes.",
|
|
130
|
-
],
|
|
131
|
-
"Confirmar asignación": ["Confirm assignment", "Confirmar atribuição", "Confirmar asignación"],
|
|
132
|
-
"Descartar cambios y actualizar": [
|
|
133
|
-
"Discard changes and refresh",
|
|
134
|
-
"Descartar alterações e atualizar",
|
|
135
|
-
"Descartar cambios y actualizar",
|
|
136
|
-
],
|
|
137
|
-
"La asignación cambió mientras editabas. Conservamos tu selección; actualiza para revisar el estado antes de volver a confirmar.": [
|
|
138
|
-
"Assignments changed while you were editing. Your selection is preserved; refresh to review the current state before confirming again.",
|
|
139
|
-
"A atribuição mudou durante a edição. Sua seleção foi preservada; atualize para revisar o estado antes de confirmar novamente.",
|
|
140
|
-
"La asignación cambió mientras editabas. Conservamos tu selección; actualiza para revisar el estado antes de volver a confirmar.",
|
|
141
|
-
],
|
|
142
|
-
"Asignación guardada.": ["Assignment saved.", "Atribuição salva.", "Asignación guardada."],
|
|
143
|
-
"No pudimos guardar la asignación. Actualiza y vuelve a intentarlo.": [
|
|
144
|
-
"We could not save the assignment. Refresh and try again.",
|
|
145
|
-
"Não foi possível salvar a atribuição. Atualize e tente novamente.",
|
|
146
|
-
"No pudimos guardar la asignación. Actualiza y vuelve a intentarlo.",
|
|
147
|
-
],
|
|
148
|
-
"Cerrar las solicitudes de depósito sin meta de esta aplicación.": [
|
|
149
|
-
"Close this application’s deposit requests without a target.",
|
|
150
|
-
"Encerrar as solicitações de depósito sem meta deste aplicativo.",
|
|
151
|
-
"Cerrar las solicitudes de depósito sin meta de esta aplicación.",
|
|
152
|
-
],
|
|
153
|
-
"Cerrar solicitud": ["Close request", "Encerrar solicitação", "Cerrar solicitud"],
|
|
154
|
-
"Confirmar cierre": ["Confirm closure", "Confirmar encerramento", "Confirmar cierre"],
|
|
155
|
-
"Seguir recaudando": ["Keep collecting", "Continuar arrecadando", "Seguir recaudando"],
|
|
156
|
-
"La solicitud dejará de aceptar nuevos aportes desde Andco. El dinero permanece en tu cuenta bancaria.": [
|
|
157
|
-
"The request will stop accepting new contributions through Andco. The money stays in your bank account.",
|
|
158
|
-
"A solicitação deixará de aceitar novos aportes pelo Andco. O dinheiro permanece na sua conta bancária.",
|
|
159
|
-
"La solicitud dejará de aceptar nuevos aportes desde Andco. El dinero permanece en tu cuenta bancaria.",
|
|
160
|
-
],
|
|
161
|
-
"Los aportes ya confirmados pueden terminar después del cierre.": [
|
|
162
|
-
"Previously confirmed contributions may finish after closure.",
|
|
163
|
-
"Aportes já confirmados podem terminar após o encerramento.",
|
|
164
|
-
"Los aportes ya confirmados pueden terminar después del cierre.",
|
|
165
|
-
],
|
|
166
|
-
"Solicitud cerrada con {{total}} el {{date}}.": [
|
|
167
|
-
"Request closed with {{total}} on {{date}}.",
|
|
168
|
-
"Solicitação encerrada com {{total}} em {{date}}.",
|
|
169
|
-
"Solicitud cerrada con {{total}} el {{date}}.",
|
|
170
|
-
],
|
|
171
|
-
"Sin meta de monto": ["No target amount", "Sem meta de valor", "Sin meta de monto"],
|
|
172
|
-
"Abonado: {{credited}}": ["Credited: {{credited}}", "Creditado: {{credited}}", "Abonado: {{credited}}"],
|
|
173
|
-
"Rechazando…": ["Declining…", "Recusando…", "Rechazando…"],
|
|
174
|
-
"Solicitud de permisos": ["Permission request", "Solicitação de permissões", "Solicitud de permisos"],
|
|
175
|
-
"Sin número": ["No account number", "Sem número", "Sin número"],
|
|
176
|
-
"Abonos asignados": ["Assigned credits", "Créditos atribuídos", "Abonos asignados"],
|
|
177
|
-
"Todavía no hay abonos asignados a esta solicitud.": [
|
|
178
|
-
"No credits have been assigned to this request yet.",
|
|
179
|
-
"Ainda não há créditos atribuídos a esta solicitação.",
|
|
180
|
-
"Todavía no hay abonos asignados a esta solicitud.",
|
|
181
|
-
],
|
|
182
|
-
"Sin referencia bancaria": ["No bank reference", "Sem referência bancária", "Sin referencia bancaria"],
|
|
183
|
-
"Reversado por el banco; no suma al total actual.": [
|
|
184
|
-
"Reversed by the bank; excluded from the current total.",
|
|
185
|
-
"Estornado pelo banco; não soma ao total atual.",
|
|
186
|
-
"Reversado por el banco; no suma al total actual.",
|
|
187
|
-
],
|
|
188
|
-
"No se conoce la hora exacta de recepción bancaria.": [
|
|
189
|
-
"The exact bank receipt time is unknown.",
|
|
190
|
-
"O horário exato do recebimento bancário é desconhecido.",
|
|
191
|
-
"No se conoce la hora exacta de recepción bancaria.",
|
|
192
|
-
],
|
|
193
|
-
"Meta completada con {{total}} el {{date}}.": [
|
|
194
|
-
"Target completed with {{total}} on {{date}}.",
|
|
195
|
-
"Meta concluída com {{total}} em {{date}}.",
|
|
196
|
-
"Meta completada con {{total}} el {{date}}.",
|
|
197
|
-
],
|
|
198
|
-
"Comisión: {{fee}}": ["Fee: {{fee}}", "Tarifa: {{fee}}", "Comisión: {{fee}}"],
|
|
199
|
-
"No hay cuentas autorizadas disponibles.": [
|
|
200
|
-
"No authorized accounts are available.",
|
|
201
|
-
"Não há contas autorizadas disponíveis.",
|
|
202
|
-
"No hay cuentas autorizadas disponibles.",
|
|
203
|
-
],
|
|
204
|
-
"Consultar la operación": ["Read operation", "Consultar operação", "Consultar la operación"],
|
|
205
|
-
"Consultando la operación": ["Loading operation", "Consultando operação", "Consultando la operación"],
|
|
206
|
-
"Consultando el estado actual…": [
|
|
207
|
-
"Loading current status…",
|
|
208
|
-
"Consultando estado atual…",
|
|
209
|
-
"Consultando el estado actual…",
|
|
210
|
-
],
|
|
211
|
-
"Realizar un depósito": ["Make a deposit", "Fazer um depósito", "Realizar un depósito"],
|
|
212
|
-
"Confirmar transferencia": ["Confirm transfer", "Confirmar transferência", "Confirmar transferencia"],
|
|
213
|
-
"Operación completada": ["Operation completed", "Operação concluída", "Operación completada"],
|
|
214
|
-
"La solicitud venció": ["This request expired", "Esta solicitação expirou", "La solicitud venció"],
|
|
215
|
-
"Procesando la operación": ["Processing operation", "Processando operação", "Procesando la operación"],
|
|
216
|
-
"La operación finalizó": ["The operation ended", "A operação terminou", "La operación finalizó"],
|
|
217
|
-
"Revisa los datos antes de continuar": [
|
|
218
|
-
"Review the details before continuing",
|
|
219
|
-
"Confira os dados antes de continuar",
|
|
220
|
-
"Revisa los datos antes de continuar",
|
|
221
|
-
],
|
|
222
|
-
"Cuenta de destino": ["Destination account", "Conta de destino", "Cuenta de destino"],
|
|
223
|
-
Destino: ["Destination", "Destino", "Destino"],
|
|
224
|
-
"Cuenta {{alias}}": ["Account {{alias}}", "Conta {{alias}}", "Cuenta {{alias}}"],
|
|
225
|
-
"Cuenta Andco {{id}}": ["Andco account {{id}}", "Conta Andco {{id}}", "Cuenta Andco {{id}}"],
|
|
226
|
-
Banco: ["Bank", "Banco", "Banco"],
|
|
227
|
-
"Tipo de cuenta": ["Account type", "Tipo de conta", "Tipo de cuenta"],
|
|
228
|
-
Corriente: ["Checking", "Corrente", "Corriente"],
|
|
229
|
-
Vista: ["Debit", "Vista", "Vista"],
|
|
230
|
-
Ahorro: ["Savings", "Poupança", "Ahorro"],
|
|
231
|
-
"Número de cuenta": ["Account number", "Número da conta", "Número de cuenta"],
|
|
232
|
-
"RUT del destinatario": ["Recipient national ID", "RUT do destinatário", "RUT del destinatario"],
|
|
233
|
-
"Nombre del destinatario": ["Recipient name", "Nome do destinatário", "Nombre del destinatario"],
|
|
234
|
-
"Cuenta de origen": ["Source account", "Conta de origem", "Cuenta de origen"],
|
|
235
|
-
"Cuenta Andco": ["Andco account", "Conta Andco", "Cuenta Andco"],
|
|
236
|
-
"Seleccionada · ": ["Selected · ", "Selecionada · ", "Seleccionada · "],
|
|
237
|
-
"Selecciona una cuenta": ["Choose an account", "Selecione uma conta", "Selecciona una cuenta"],
|
|
238
|
-
"Monto a abonar (CLP)": ["Deposit amount (CLP)", "Valor do depósito (CLP)", "Monto a abonar (CLP)"],
|
|
239
|
-
"Monto a transferir (CLP)": ["Transfer amount (CLP)", "Valor da transferência (CLP)", "Monto a transferir (CLP)"],
|
|
240
|
-
"Monto a abonar": ["Deposit amount", "Valor do depósito", "Monto a abonar"],
|
|
241
|
-
Descripción: ["Bank reference", "Referência bancária", "Descripción"],
|
|
242
|
-
"Confirmando…": ["Confirming…", "Confirmando…", "Confirmando…"],
|
|
243
|
-
"Reintentar la misma operación": [
|
|
244
|
-
"Retry the same operation",
|
|
245
|
-
"Tentar novamente a mesma operação",
|
|
246
|
-
"Reintentar la misma operación",
|
|
247
|
-
],
|
|
248
|
-
"Confirmar abono": ["Confirm deposit", "Confirmar depósito", "Confirmar abono"],
|
|
249
|
-
"Abonar $100.000 de desarrollo": [
|
|
250
|
-
"Add CLP 100,000 test funds",
|
|
251
|
-
"Adicionar CLP 100.000 de teste",
|
|
252
|
-
"Abonar $100.000 de desarrollo",
|
|
253
|
-
],
|
|
254
|
-
"Actualizar estado": ["Refresh status", "Atualizar estado", "Actualizar estado"],
|
|
255
|
-
"Volver a la aplicación": ["Return to the app", "Voltar ao aplicativo", "Volver a la aplicación"],
|
|
256
|
-
Cerrar: ["Close", "Fechar", "Cerrar"],
|
|
257
|
-
"Transfiere a esta cuenta o abona desde una de tus cuentas Andco. Cerrar esta pantalla no cancela el depósito.": [
|
|
258
|
-
"Transfer to this account or fund it from one of your Andco accounts. Closing this screen does not cancel the deposit.",
|
|
259
|
-
"Transfira para esta conta ou deposite de uma de suas contas Andco. Fechar esta tela não cancela o depósito.",
|
|
260
|
-
"Transfiere a esta cuenta o abona desde una de tus cuentas Andco. Cerrar esta pantalla no cancela el depósito.",
|
|
261
|
-
],
|
|
262
|
-
"Selecciona una Organización": ["Choose an Organization", "Selecione uma Organização", "Selecciona una Organización"],
|
|
263
|
-
"Solo se muestran Organizaciones en las que puedes autorizar aplicaciones.": [
|
|
264
|
-
"Only Organizations where you can authorize applications are shown.",
|
|
265
|
-
"São exibidas apenas Organizações nas quais você pode autorizar aplicativos.",
|
|
266
|
-
"Solo se muestran Organizaciones en las que puedes autorizar aplicaciones.",
|
|
267
|
-
],
|
|
268
|
-
"Ya no tienes permiso para autorizar esta conexión. Revisa el acceso a la Organización e inténtalo nuevamente.": [
|
|
269
|
-
"You can no longer authorize this connection. Check your Organization access and try again.",
|
|
270
|
-
"Você não pode mais autorizar esta conexão. Confira seu acesso à Organização e tente novamente.",
|
|
271
|
-
"Ya no tienes permiso para autorizar esta conexión. Revisa el acceso a la Organización e inténtalo nuevamente.",
|
|
272
|
-
],
|
|
273
|
-
"Cuenta autorizada": ["Authorized account", "Conta autorizada", "Cuenta autorizada"],
|
|
274
|
-
"Elige la cuenta exacta. La Miniapp no tendrá acceso a tus demás cuentas.": [
|
|
275
|
-
"Choose the exact account. The Miniapp will not have access to your other accounts.",
|
|
276
|
-
"Escolha a conta exata. A Miniapp não terá acesso às suas outras contas.",
|
|
277
|
-
"Elige la cuenta exacta. La Miniapp no tendrá acceso a tus demás cuentas.",
|
|
278
|
-
],
|
|
279
|
-
"Esta Miniapp podrá": ["This Miniapp will be able to", "Esta Miniapp poderá", "Esta Miniapp podrá"],
|
|
280
|
-
"Sin número visible": ["No visible number", "Sem número visível", "Sin número visible"],
|
|
281
|
-
Requerido: ["Required", "Obrigatório", "Requerido"],
|
|
282
|
-
"Compartir con {{name}}": ["Share with {{name}}", "Compartilhar com {{name}}", "Compartir con {{name}}"],
|
|
283
|
-
"Opcional: puedes autorizar sin este proveedor.": [
|
|
284
|
-
"Optional: you can authorize without this provider.",
|
|
285
|
-
"Opcional: você pode autorizar sem este provedor.",
|
|
286
|
-
"Opcional: puedes autorizar sin este proveedor.",
|
|
287
|
-
],
|
|
288
|
-
"No se compartirá nada con {{name}}.": [
|
|
289
|
-
"Nothing will be shared with {{name}}.",
|
|
290
|
-
"Nada será compartilhado com {{name}}.",
|
|
291
|
-
"No se compartirá nada con {{name}}.",
|
|
292
|
-
],
|
|
293
|
-
"Requerido: la aplicación necesita todos estos permisos.": [
|
|
294
|
-
"Required: the application needs all of these permissions.",
|
|
295
|
-
"Obrigatório: o aplicativo precisa de todas estas permissões.",
|
|
296
|
-
"Requerido: la aplicación necesita todos estos permisos.",
|
|
297
|
-
],
|
|
298
|
-
Preseleccionado: ["Preselected", "Pré-selecionado", "Preseleccionado"],
|
|
299
|
-
Opcional: ["Optional", "Opcional", "Opcional"],
|
|
300
|
-
"Concedido el {{date}}": ["Granted on {{date}}", "Concedido em {{date}}", "Concedido el {{date}}"],
|
|
301
|
-
"Concedido por tu Organización el {{date}}": [
|
|
302
|
-
"Granted by your Organization on {{date}}",
|
|
303
|
-
"Concedido pela sua Organização em {{date}}",
|
|
304
|
-
"Concedido por tu Organización el {{date}}",
|
|
305
|
-
],
|
|
306
|
-
REQUERIDO: ["REQUIRED", "OBRIGATÓRIO", "REQUERIDO"],
|
|
307
|
-
PRESELECCIONADO: ["PRESELECTED", "PRÉ-SELECIONADO", "PRESELECCIONADO"],
|
|
308
|
-
OPCIONAL: ["OPTIONAL", "OPCIONAL", "OPCIONAL"],
|
|
309
|
-
Rechazar: ["Decline", "Recusar", "Rechazar"],
|
|
310
|
-
Permitir: ["Allow", "Permitir", "Permitir"],
|
|
311
|
-
"Permitir y continuar": ["Allow and continue", "Permitir e continuar", "Permitir y continuar"],
|
|
312
|
-
"Autorizando…": ["Authorizing…", "Autorizando…", "Autorizando…"],
|
|
313
|
-
"Ahora no": ["Not now", "Agora não", "Ahora no"],
|
|
314
|
-
"Cancelando solicitud…": ["Cancelling request…", "Cancelando solicitação…", "Cancelando solicitud…"],
|
|
315
|
-
"Revisa los permisos antes de continuar. Puedes revocar el acceso desde Andco.": [
|
|
316
|
-
"Review the permissions before continuing. You can revoke access in Andco.",
|
|
317
|
-
"Confira as permissões antes de continuar. Você pode revogar o acesso no Andco.",
|
|
318
|
-
"Revisa los permisos antes de continuar. Puedes revocar el acceso desde Andco.",
|
|
319
|
-
],
|
|
320
|
-
"Elige qué información compartir. Los permisos requeridos siempre se incluyen.": [
|
|
321
|
-
"Choose which information to share. Required permissions are always included.",
|
|
322
|
-
"Escolha as informações que deseja compartilhar. As permissões obrigatórias são sempre incluídas.",
|
|
323
|
-
"Elige qué información compartir. Los permisos requeridos siempre se incluyen.",
|
|
324
|
-
],
|
|
325
|
-
"Compartir información con {{project}}": [
|
|
326
|
-
"Share information with {{project}}",
|
|
327
|
-
"Compartilhar informações com {{project}}",
|
|
328
|
-
"Compartir información con {{project}}",
|
|
329
|
-
],
|
|
330
|
-
"Autorizar a {{project}}": ["Authorize {{project}}", "Autorizar {{project}}", "Autorizar a {{project}}"],
|
|
331
|
-
"Organización: {{organization}}": [
|
|
332
|
-
"Organization: {{organization}}",
|
|
333
|
-
"Organización: {{organization}}",
|
|
334
|
-
"Organización: {{organization}}",
|
|
335
|
-
],
|
|
336
|
-
"Cuenta Andco: {{email}}": ["Andco account: {{email}}", "Conta Andco: {{email}}", "Cuenta Andco: {{email}}"],
|
|
337
|
-
"Retorno: {{host}}": ["Return to: {{host}}", "Retorno: {{host}}", "Retorno: {{host}}"],
|
|
338
|
-
"Vence en {{seconds}} segundos": [
|
|
339
|
-
"Expires in {{seconds}} seconds",
|
|
340
|
-
"Expira em {{seconds}} segundos",
|
|
341
|
-
"Vence en {{seconds}} segundos",
|
|
342
|
-
],
|
|
343
|
-
"Abonado: {{credited}} · Pendiente: {{remaining}}": [
|
|
344
|
-
"Credited: {{credited}} · Remaining: {{remaining}}",
|
|
345
|
-
"Depositado: {{credited}} · Restante: {{remaining}}",
|
|
346
|
-
"Abonado: {{credited}} · Pendiente: {{remaining}}",
|
|
347
|
-
],
|
|
348
|
-
"Selecciona entre {{min}} y {{max}} cuentas.": [
|
|
349
|
-
"Select {{min}} to {{max}} accounts.",
|
|
350
|
-
"Selecione entre {{min}} e {{max}} contas.",
|
|
351
|
-
"Selecciona entre {{min}} y {{max}} cuentas.",
|
|
352
|
-
],
|
|
353
|
-
"Autorizar a {{project}} en nombre de esta Organización.": [
|
|
354
|
-
"Authorize {{project}} on behalf of this Organization.",
|
|
355
|
-
"Autorizar {{project}} em nome desta Organização.",
|
|
356
|
-
"Autorizar a {{project}} en nombre de esta Organización.",
|
|
357
|
-
],
|
|
358
|
-
"Consultar el saldo y los datos públicos de esta cuenta.": [
|
|
359
|
-
"Read this account’s balance and public details.",
|
|
360
|
-
"Consultar o saldo e os dados públicos desta conta.",
|
|
361
|
-
"Consultar el saldo y los datos públicos de esta cuenta.",
|
|
362
|
-
],
|
|
363
|
-
"Iniciar depósitos guiados hacia esta cuenta.": [
|
|
364
|
-
"Initiate guided deposits into this account.",
|
|
365
|
-
"Iniciar depósitos guiados nesta conta.",
|
|
366
|
-
"Iniciar depósitos guiados hacia esta cuenta.",
|
|
367
|
-
],
|
|
368
|
-
"Consultar los depósitos iniciados para esta cuenta.": [
|
|
369
|
-
"Read deposits initiated for this account.",
|
|
370
|
-
"Consultar os depósitos iniciados nesta conta.",
|
|
371
|
-
"Consultar los depósitos iniciados para esta cuenta.",
|
|
372
|
-
],
|
|
373
|
-
"Iniciar retiros guiados desde esta cuenta.": [
|
|
374
|
-
"Initiate guided withdrawals from this account.",
|
|
375
|
-
"Iniciar saques guiados desta conta.",
|
|
376
|
-
"Iniciar retiros guiados desde esta cuenta.",
|
|
377
|
-
],
|
|
378
|
-
"Confirmar retiros desde esta cuenta.": [
|
|
379
|
-
"Confirm withdrawals from this account.",
|
|
380
|
-
"Confirmar saques desta conta.",
|
|
381
|
-
"Confirmar retiros desde esta cuenta.",
|
|
382
|
-
],
|
|
383
|
-
"Consultar los retiros iniciados desde esta cuenta.": [
|
|
384
|
-
"Read withdrawals initiated from this account.",
|
|
385
|
-
"Consultar os saques iniciados desta conta.",
|
|
386
|
-
"Consultar los retiros iniciados desde esta cuenta.",
|
|
387
|
-
],
|
|
388
|
-
"Identidad OpenID": ["OpenID identity", "Identidade OpenID", "Identidad OpenID"],
|
|
389
|
-
"Correo electrónico": ["Email address", "Endereço de e-mail", "Correo electrónico"],
|
|
390
|
-
"Nombre y avatar": ["Name and avatar", "Nome e avatar", "Nombre y avatar"],
|
|
391
|
-
"Número de teléfono": ["Phone number", "Número de telefone", "Número de teléfono"],
|
|
392
|
-
"Mantener el acceso sin conexión": [
|
|
393
|
-
"Maintain access when offline",
|
|
394
|
-
"Manter o acesso offline",
|
|
395
|
-
"Mantener el acceso sin conexión",
|
|
396
|
-
],
|
|
397
|
-
días: ["days", "dias", "días"],
|
|
398
|
-
meses: ["months", "meses", "meses"],
|
|
399
|
-
años: ["years", "anos", "años"],
|
|
400
|
-
};
|