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

XLF file not processed #807

Open
danjor opened this issue May 18, 2022 · 3 comments
Open

XLF file not processed #807

danjor opened this issue May 18, 2022 · 3 comments

Comments

@danjor
Copy link

danjor commented May 18, 2022

Hello,

I'm facing some issue where .xlf files are not processed even if the readme indicated this format is handled 👍
https://www.mojito.global//docs/refs/mojito-file-formats/

mojito repo-create -n MyRepo -l fr-FR

Create repository: MyRepo
Extracting locale: fr-FR
Extracted RepositoryLocale:
-- bcp47Tag = fr-FR
-- isFullyTranslated = true

created --> repository id: 14
mkdir MyRepo
cd MyRepo 
ls 
resources_fr-FR.xlf

mojito import -r MyRepo

Start importing localized files for repository: MyRepo


Finished

Nothing got imported.
I had to rename .xlf to .xliff file to be detected.
.xlf should also be handled.

@aurambaj
Copy link
Collaborator

Just to clarify did you do a push first to import the source string (your ls command doesn't show a source file, just the localzied french file)? Then you can do the import

@danjor
Copy link
Author

danjor commented May 19, 2022

Yes I did that. For .xlf :

:/MyRepo# ll
total 776
drwxr-xr-x. 2 root root     58 May 19 07:34 ./
drwxr-xr-x. 1 root root    213 May 18 12:19 ../
-rw-r--r--. 1 root root 455817 May 18 09:32 resources_fr-FR.xlf
-rw-r--r--. 1 root root 333749 May 19 07:33 resources.xliff
root@ea992b8521c6:/MyRepo # mojito repo-create -n MyRepo -l fr-FR
Create repository: MyRepo 
Extracting locale: fr-FR
Extracted RepositoryLocale:
-- bcp47Tag = fr-FR
-- isFullyTranslated = true

created --> repository id: 20
:/MyRepo # mojito push -r MyRepo -s /MyRepo / -sr "^resources.xlf$"

Push assets to repository: MyRepo 


Finished

As you can see, this last step, nothing was imported.

Now doing the same with .xliff :

:/MyRepo# ll
total 776
drwxr-xr-x. 2 root root     58 May 19 07:34 ./
drwxr-xr-x. 1 root root    213 May 18 12:19 ../
-rw-r--r--. 1 root root 455817 May 18 09:32 resources_fr-FR.xliff
-rw-r--r--. 1 root root 333749 May 19 07:33 resources.xliff
:/MyRepo # mojito repo-create -n MyRepo -l fr-FR
Create repository: MyRepo 
Extracting locale: fr-FR
Extracted RepositoryLocale:
-- bcp47Tag = fr-FR
-- isFullyTranslated = true

created --> repository id: 21
:/MyRepo # mojito push -r MyRepo -s /MyRepo / -sr "^resources.xliff$"

Push assets to repository: MyRepo

 - Uploading: resources.xliff
 --> asset id: 13, task: 227

Running, task id: 227
Creating asset: resources.xliff (228) Done
Process asset content, id: 13 (229) Done
  Extracting text units from asset (230) Done
  Create new text units (231) Done
  Updating branch asset text units (233) Done
  Updating merged asset text units (235) Done
  Perform leveraging (236) Done

Finished

.xlif is found and being imported.
Which was not the case with .xlf

@aurambaj
Copy link
Collaborator

Yes, right now Mojito only support .xliff and not .xlf as extension. We'd need to do some modification to support multiple extension for a given file format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants