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