You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the first version of source_commit a command line tool that helps us to know the last SHA of a given file.
Current Behavior
Currently, we can use it with relative or full paths.
Let's suppose we want to know the sha of the following file content/files/en-us/web/index.md
We can go to the web folder and just pass the file as argument, like so.
cd content/files/en-us/web
source_commit --from index.md
# will print the sha file
Or being into the translated-content repository you can pass a full path:
source_commit --from /home/user/code/content/files/en-us/web/index.md
# will print the sha file
Next Step
I'm thinking on add a second argument called --to this way we will be able to add the l10n section into our file.
# being in translated-content/files/es/web/
source_commit --from /code/content/files/en-us/web/index.md --to index.md
# will print the sha file# will open the index.md file (translated-content/files/es/web/index.md)# and write in the metadata as last argument the `l10n` something like this:
---
title: Tecnología para desarrolladores web
slug: Web
translation_of: Web
l10n:
sourceCommit: some-sha-here
---
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello 👋!
This is the first version of
source_commit
a command line tool that helps us to know the last SHA of a given file.Current Behavior
Currently, we can use it with relative or full paths.
Let's suppose we want to know the
sha
of the following filecontent/files/en-us/web/index.md
We can go to the web folder and just pass the file as argument, like so.
Or being into the
translated-content
repository you can pass a full path:source_commit --from /home/user/code/content/files/en-us/web/index.md # will print the sha file
Next Step
I'm thinking on add a second argument called
--to
this way we will be able to add thel10n
section into our file.Any thoughts are welcome...
Beta Was this translation helpful? Give feedback.
All reactions