Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If filename doesn't have .atf extension, validation/lemmatisation of an invalid file never returns errors #99

Closed
giordano opened this issue Feb 7, 2022 · 3 comments · Fixed by #100
Labels
bug Something isn't working remote Communication with the Oracc server

Comments

@giordano
Copy link
Collaborator

giordano commented Feb 7, 2022

Describe the problem

Similarly to #90 (which is now fixed on the server side), if an ATF file doesn't have atf extension, running validation or lemmatisation on it never returns errors.

I'm not sure how to best address this issue. I see two options:

  • show a warning that the file doesn't have .atf extension when trying to do validation/lemmatisation, not having the extension is likely an oversight
  • we can artificially add the extension if it's missing, similarly to what we initially did in Add test for validation of filenames with spaces #91.

I guess the decision boils down to whether we want to force the extension in the filename or not

To Reproduce

Create an ATF with this content:

&X001001 = JCS 48, 089
#project: cams/gkab
#atf: lang akk-x-stdbab
#atf: use unicode
#atf: use math
@tablet
@obverse

1.	[MU] 1.03-KAM {iti}AB GE₆ U₄ 2-KAM
#lem: šatti[year]N; n; Ṭebetu[1]MN; mūša[at night]AV; ūm[day]N; n

2.	[{m}]{d}60--EN-šu₂-nu a-lid
#lem: ūmišu[day]N; Šamaš[1]DN

$ single ruling
# I've added various things for test purposes

#note: Note to line.

4.	<30> <(ina)> 12 GU U₄-ME-šu₂ GID₂-MEŠ{{ir-ri-ku}}
#lem: Sin[1]DN; ina[at]PRP; n; Gula[1]'CN; ūmūšu[day]N; +arāku[be(come) long]V$irrikū; +arāku[be(come) long]V$irrikū +.+. . 

5.	[GU₄].U₄ ina MAŠ₂ GENNA ina MIN<(MAŠ₂)>
#lem: Šihṭu[Mercury]CN; ina[in]PRP; Suhurmašu[Goatfish]CN +.+. . ; Kayyamanu[Saturn]CN; ina[in]PRP; Suhurmašu[Goatfish]CN

6.	[AN] ina ALLA <<ALLA>>
#lem: Ṣalbatanu[Mars]CN; ina[in]PRP; Alluttu[Crab]CN +.+. . 

7.    $BI x X |DU.DU| |GA₂×AN| |DU&DU| |LAGAB&LAGAB| DU@g GAN₂@t 4(BAN₂)@v
#lem: u; u; X; X; X; X; X; X; X; n

$ (a loose dollar line)

@reverse
$ reverse blank

@translation parallel en project
@obverse
1.	Year 63, Ṭebetu (Month X), night of day 2:^1^

@note ^1^ A note to the translation.

2.	Anu-belšunu was born.
3.	That day, the Sun was 9;30˚ in the Goat.
4.	The Moon was 12˚ in the Bucket: his days will be long.
5.	Jupiter was at the head of the Scorpion: someone will take the prince's hand.
6.	[The child] was born in the Bucket in the region of Venus: he will have sons.
7.	Mercury was in the Goat; Saturn was in the Goat;

and filename filename, without extension. Run validation: the "Validation successful" pop up is always shown, even though there are errors.

Expected behavior

Get the "Validation identified errors. See log for details" pop up

Additional context

Like #90, the symptoms are similar to #89.

@giordano
Copy link
Collaborator Author

giordano commented Feb 8, 2022

Eleanor suggests enforcing the .atf extension. We can pop up a message saying that the file should have the extension.

@giordano giordano added bug Something isn't working remote Communication with the Oracc server labels Feb 11, 2022
@ageorgou
Copy link
Contributor

Would this happen in normal (non-development) use? Isn't the extension "disabled" if the file name doesn't end in .atf? Though there's no reason not to have this anyway! (and we may handle files with other extensions later)

@giordano
Copy link
Collaborator Author

Isn't the extension "disabled" if the file name doesn't end in .atf?

When you create a new empty file you can choose what language mode to use. I created the example in #100 (comment) in this way, without saving the new file, Unititled-1 was the default name.

The extension matching is only for default autoguessing, but you can always choose the language mode of a file from the bottom right bar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working remote Communication with the Oracc server
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants