Skip to content

Commit

Permalink
Fix source history incorrect listing (#147)
Browse files Browse the repository at this point in the history
* Fix source history incorrect listing

* Create early-tomatoes-reflect.md
  • Loading branch information
yanthomasdev authored Jun 21, 2024
1 parent ec1f3c3 commit 30ecd70
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/early-tomatoes-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@lunariajs/core": patch
---

Fix source history incorrect listing
10 changes: 4 additions & 6 deletions packages/core/src/status/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,8 @@ export async function getLocalizationStatus(config: LunariaConfig, isShallowRepo
localizations[lang] = {
isMissing: true,
gitHostingFileURL: gitHostingLinks.create(localeFilePath),
gitHostingHistoryURL: gitHostingLinks.history(
sourceFile.path,
sourceFile.git.lastMajorChange
),
// When the file doesn't exist, we give it a clean history URL, without a since date.
gitHostingHistoryURL: gitHostingLinks.history(sourceFile.path),
};
break;
}
Expand All @@ -75,7 +73,7 @@ export async function getLocalizationStatus(config: LunariaConfig, isShallowRepo
isOutdated: sourceFile.git.lastMajorChange > localizationFile.git.lastMajorChange,
gitHostingHistoryURL: gitHostingLinks.history(
sourceFile.path,
sourceFile.git.lastMajorChange
localizationFile.git.lastMajorChange
),
meta: {
type: 'universal',
Expand All @@ -91,7 +89,7 @@ export async function getLocalizationStatus(config: LunariaConfig, isShallowRepo
isOutdated: sourceFile.git.lastMajorChange > localizationFile.git.lastMajorChange,
gitHostingHistoryURL: gitHostingLinks.history(
sourceFile.path,
sourceFile.git.lastMajorChange
localizationFile.git.lastMajorChange
),
meta: {
type: 'dictionary',
Expand Down

0 comments on commit 30ecd70

Please sign in to comment.