Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
imnasnainaec committed Nov 30, 2023
1 parent 5262014 commit 33ad76c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/goals/ReviewEntries/ReviewEntriesTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ export class ReviewEntriesWord {
flag: Flag;
protected: boolean;

/** Construct a ReviewEntriesWord from a Word.
* Important: Some things (e.g., note language) aren't preserved! */
constructor(word?: Word, analysisLang?: string) {
if (!word) {
word = newWord();
Expand All @@ -84,6 +86,9 @@ export class ReviewEntriesSense {
deleted: boolean;
protected: boolean;

/** Construct a ReviewEntriesSense from a Sense.
* Important: Some things aren't preserved!
* (E.g., distinct glosses with the same language are combined.) */
constructor(sense?: Sense, analysisLang?: string) {
if (!sense) {
sense = newSense();
Expand Down Expand Up @@ -115,7 +120,8 @@ export class ReviewEntriesSense {
}

/** Reverse map of the ReviewEntriesSense constructor.
* Important: Not everything is preserved! */
* Important: Some things aren't preserved!
* (E.g., distinct glosses with the same language may have been combined.) */
function senseFromReviewEntriesSense(revSense: ReviewEntriesSense): Sense {
return {
...newSense(),
Expand All @@ -133,7 +139,7 @@ function senseFromReviewEntriesSense(revSense: ReviewEntriesSense): Sense {
}

/** Reverse map of the ReviewEntriesWord constructor.
* Important: Not everything is preserved! */
* Important: Some things (e.g., note language) aren't preserved! */
export function wordFromReviewEntriesWord(revWord: ReviewEntriesWord): Word {
return {
...newWord(revWord.vernacular),
Expand Down
1 change: 1 addition & 0 deletions src/utilities/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export function getDateTimeString(
date.getSeconds(),
];
const strs = vals.map((value) => (value < 10 ? `0${value}` : `${value}`));
// TODO: Consider localization of the date-time formatting.
const dateString = strs.slice(0, 3).join(sep?.date ?? pathSep.date);
const timeString = strs.slice(3, 6).join(sep?.time ?? pathSep.time);
return `${dateString}${sep?.dateTime ?? pathSep.dateTime}${timeString}`;
Expand Down

0 comments on commit 33ad76c

Please sign in to comment.