Bilingual as-of line: FR card/stamp showed English 'October 2026 (CPP 2026, OAS/GIS Oct-Dec 2026, tax 2026)'. Added asOfFr (octobre 2026, RPC/SV/SRG, impôts) in canada.js + generator; render sites pick by getLang(). Smoke 90->92 with a localization guard.

This commit is contained in:
krisf committed 2026-10-09 13:20:58 -04:00
1 parent d53dd81202
commit cab6e3d1ed
4 files changed
+5 -2

No files matched your search

+1
View File
@@ -87,6 +87,7 @@ const doc = {
generated: "2026-10-08", generated: "2026-10-08",
year: "2026 (live-fetched; plan fallbacks were 2025)", year: "2026 (live-fetched; plan fallbacks were 2025)",
asOf: "October 2026 (CPP 2026, OAS/GIS Oct-Dec 2026, tax 2026)", asOf: "October 2026 (CPP 2026, OAS/GIS Oct-Dec 2026, tax 2026)",
asOfFr: "octobre 2026 (RPC 2026, SV/SRG oct.-déc. 2026, impôts 2026)",
cppMax65Monthly: { value: 1507.65, source: E + " Table 1, Jan 2026 (incl. CPP enhancement)", asOf: ASOF_ESDC }, cppMax65Monthly: { value: 1507.65, source: E + " Table 1, Jan 2026 (incl. CPP enhancement)", asOf: ASOF_ESDC },
ympe: { value: 74600, source: E + " Table 2 YMPE 2026 (YBE $3,500)", asOf: ASOF_ESDC }, ympe: { value: 74600, source: E + " Table 2 YMPE 2026 (YBE $3,500)", asOf: ASOF_ESDC },
oasMax6574Monthly: { value: 762.50, source: O + " Oct-Dec 2026", asOf: ASOF_OAS }, oasMax6574Monthly: { value: 762.50, source: O + " Oct-Dec 2026", asOf: ASOF_OAS },
+2 -2
View File
@@ -694,7 +694,7 @@
notes.push(t('ps.card.nPartTime')); notes.push(t('ps.card.nPartTime'));
notes.push(t('ps.card.nSplit')); notes.push(t('ps.card.nSplit'));
h += '<p class="cap">' + notes.join(' ') + '</p>'; h += '<p class="cap">' + notes.join(' ') + '</p>';
var asOf = C.asOf, dPspc = '2025-08-15'; var asOf = (getLang() === 'fr' ? C.asOfFr : C.asOf), dPspc = '2025-08-15';
h += '<p class="cap">' + t('ps.card.sources') + ' ' + h += '<p class="cap">' + t('ps.card.sources') + ' ' +
'<a href="' + (ps.group === 1 ? S.g1En : S.g2En) + '" rel="noopener" target="_blank">' + t('ps.card.srcPspc', { d: dPspc }) + '</a> · ' + '<a href="' + (ps.group === 1 ? S.g1En : S.g2En) + '" rel="noopener" target="_blank">' + t('ps.card.srcPspc', { d: dPspc }) + '</a> · ' +
'<a href="' + S.atAGlanceEn + '" rel="noopener" target="_blank">' + t('ps.card.srcGlance') + '</a> · ' + '<a href="' + S.atAGlanceEn + '" rel="noopener" target="_blank">' + t('ps.card.srcGlance') + '</a> · ' +
@@ -757,7 +757,7 @@
var m2 = fmtMoney2; var m2 = fmtMoney2;
$('#stamp').textContent = t('r.stamp', { $('#stamp').textContent = t('r.stamp', {
cpp: m2(C.cppMax65Monthly.value), oas: m2(C.oasMax6574Monthly.value), cpp: m2(C.cppMax65Monthly.value), oas: m2(C.oasMax6574Monthly.value),
gis: m2(C.gisMaxSingleMonthly.value), asOf: C.asOf gis: m2(C.gisMaxSingleMonthly.value), asOf: getLang() === 'fr' ? C.asOfFr : C.asOf
}); });
var a = state.a; var a = state.a;
+1
View File
@@ -4,6 +4,7 @@
"generated": "2026-10-08", "generated": "2026-10-08",
"year": "2026 (live-fetched; plan fallbacks were 2025)", "year": "2026 (live-fetched; plan fallbacks were 2025)",
"asOf": "October 2026 (CPP 2026, OAS/GIS Oct-Dec 2026, tax 2026)", "asOf": "October 2026 (CPP 2026, OAS/GIS Oct-Dec 2026, tax 2026)",
"asOfFr": "octobre 2026 (RPC 2026, SV/SRG oct.-déc. 2026, impôts 2026)",
"cppMax65Monthly": { "cppMax65Monthly": {
"value": 1507.65, "value": 1507.65,
"source": "https://www.canada.ca/en/employment-social-development/programs/pensions/pension/statistics/2026-quarterly-april-june.html Table 1, Jan 2026 (incl. CPP enhancement)", "source": "https://www.canada.ca/en/employment-social-development/programs/pensions/pension/statistics/2026-quarterly-april-june.html Table 1, Jan 2026 (incl. CPP enhancement)",
+1
View File
@@ -198,6 +198,7 @@ function runPs(lang, M, done) {
ok('PS card table uses non-colliding class ps-tbl (grid-on-table would blank the card)', ok('PS card table uses non-colliding class ps-tbl (grid-on-table would blank the card)',
/<table class="ps-tbl">/.test(h) && (h.match(/<tr>/g) || []).length >= 7, /<table class="ps-tbl">/.test(h) && (h.match(/<tr>/g) || []).length >= 7,
'rows=' + (h.match(/<tr>/g) || []).length); 'rows=' + (h.match(/<tr>/g) || []).length);
ok('as-of line localized (' + lang + ')', lang === 'fr' ? (!/October|Oct-Dec/.test(h) && /octobre 2026/.test(h)) : /October 2026/.test(h));
ok('PS series in G2 chart', M.psSeries.test(N(q('#g2')._html)), N(q('#g2')._html).slice(0, 40)); ok('PS series in G2 chart', M.psSeries.test(N(q('#g2')._html)), N(q('#g2')._html).slice(0, 40));
ok('PS insight in live panel', M.psInsight.test(N(q('#panel-insight')._html)), N(q('#panel-insight')._html).slice(0, 70)); ok('PS insight in live panel', M.psInsight.test(N(q('#panel-insight')._html)), N(q('#panel-insight')._html).slice(0, 70));
done(); done();