lingo.dev 0.117.15 → 0.117.16

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/build/cli.mjs CHANGED
@@ -5477,23 +5477,25 @@ function createPoDataLoader(params) {
5477
5477
  const contextKey = _12.keys(sectionPo.translations)[0];
5478
5478
  const entries = sectionPo.translations[contextKey];
5479
5479
  const msgid = Object.keys(entries).find((key) => entries[key].msgid);
5480
+ const currentSection = currentSections.find((cs) => {
5481
+ const csPo = gettextParser.po.parse(cs);
5482
+ const csContextKey = _12.keys(csPo.translations)[0];
5483
+ const csEntries = csPo.translations[csContextKey];
5484
+ const csMsgid = Object.keys(csEntries).find(
5485
+ (key) => csEntries[key].msgid
5486
+ );
5487
+ return csMsgid === msgid;
5488
+ });
5480
5489
  if (!msgid) {
5481
- const currentSection = currentSections.find((cs) => {
5482
- const csPo = gettextParser.po.parse(cs);
5483
- const csContextKey = _12.keys(csPo.translations)[0];
5484
- const csEntries = csPo.translations[csContextKey];
5485
- const csMsgid = Object.keys(csEntries).find(
5486
- (key) => csEntries[key].msgid
5487
- );
5488
- return csMsgid === msgid;
5489
- });
5490
5490
  if (currentSection) {
5491
5491
  return currentSection;
5492
5492
  }
5493
5493
  return section;
5494
5494
  }
5495
5495
  if (data[msgid]) {
5496
+ const headers = currentSection ? gettextParser.po.parse(currentSection).headers : sectionPo.headers;
5496
5497
  const updatedPo = _12.merge({}, sectionPo, {
5498
+ headers,
5497
5499
  translations: {
5498
5500
  [contextKey]: {
5499
5501
  [msgid]: {
@@ -14603,7 +14605,7 @@ async function renderHero2() {
14603
14605
  // package.json
14604
14606
  var package_default = {
14605
14607
  name: "lingo.dev",
14606
- version: "0.117.15",
14608
+ version: "0.117.16",
14607
14609
  description: "Lingo.dev CLI",
14608
14610
  private: false,
14609
14611
  repository: {