Shopify: New Github Repository Translation Issue - shopify

I am currently using Translate&Adapt as a translation application. My goal is to be able to retrieve translations associated with an existing theme, synced with Github, for a second theme that is also synced to a Github repository. In fact, when I wanted to change my published theme and change the language of my website via a language switcher, the pages were not translated at all due to "broken translations" since the "correct translations" were not synced with the new theme. I would like to know how to perform this synchronization.
I noticed that when I localized the different untranslated texts in Translate&Adapt, there are ids associated with each translation, so I suppose that these ids are linked to the first theme and that it is necessary to either modify them or make the second theme point to these ids (I don't know if this is really possible).
I cloned the published theme's Github repository to a second repository
I connected the second repository to the store (it was therefore in an unpublished state)
I made modifications to the language switcher in the unpublished theme
I published the theme connected to the second Github repository
I noticed that the contents of different sections were not translated.
It should be noted that this repository change is something that cannot be avoided (otherwise, we would have made the changes directly to the published theme)."
Anyway, I am open to any proposals for solutions, thank you in advance!
I also asked my question here: https://community.shopify.com/c/shopify-translate-adapt/new-github-repository-translation-issue/m-p/1920126#M396

Related

Programmatically update product.liquid on app install

Our Shopify app is activated by adding our snippet into the product and cart liquid files.
We noticed that adding the snippet is a tricky part for most merchants and we would like to offer them an option that we would do the heavy lifting for them.
My questions:
What is the best practice for doing such action?
How we can go on preview mode and wait till the merchant accept the change?
Any code samples using the Shopify Python SDK will be highly appreciated.
Thanks!
Here is a pattern that will work, and cause the least damage on uninstall.
download product.liquid using API (have fun ensuring you get the one that matters, as it could be in sections or snippets now)
inject your special codes in that snippet
upload your modified product.foobleflap.liquid
So now all your merchant need do is substitute your Liquid file for the original one. On App uninstall, no kittens have been killed, they need to simply revert back to their original Liquid file
Of course there are other patterns, but modding their original file with your snippet is probably least desirable from an uninstall perspective, as they would have to manually erase traces of your code.

Link to JCentre button not present

This is unfamiliar to me - I am not used to distributing software in this way, but it seems like everything should be working, unless I have made a mistake.
On Bintray, I'm trying to release a thing I forked as I want to include it as a dependency in my lib and my app, instead of directly. It's also a learning thing, so feel free to educate me if appropriate.
I've uploaded everything correctly I believe, and unlike every other question I've seen - I actually have signed up for an OSS account, but still can't see the "Link to JCentre" button -
Did I do something wrong? Or has something changed?
I also am assuming I may have to wait for a while before I can link it.I can see my version badge and so on, but I want to access this via gradle. The section appears on my package information screen, but it says 0 links and there's no buttons.
Thanks guys!
Here is a link to my (EDIT: [now successfully updated]) repository. It is a fork of Galgo to add support for Android M+
In order to be enable to "Link to JCenter", your repository needs to be public and Maven type, you also can't be a trial user (see answer here).
The problem that you are facing is that your repository if Generic and not Maven.
You can check your repository type by navigating to your repository edit page, you'll find the Type field (which can't be edited). It should say Maven.
You can also check the Owned Repositories from the organization profile page. The text in parenthesis states the repository type.

How to create a searchable central repository of code documentation using DocFx

I'm looking to create a central repository for all of our published API documentation using DocFx. I have documentation auto-generated via my build (using TFS) and published through my release (using Octopus) just fine for multiple individual sites. However, I'm wanting to pull it altogether in one location. The thinking is that through a parent site you could filter content in any of the individual sites without having to drill down into them. Do you have a recommendation on how to do this?
Also, within this same documentation repository I want to provide the capability to search by all of the meta data (project-level documentation) across the hundreds of projects in our portfolio. This will give our BA, DEV and QA teams easier access to what all our systems do. I like the "filtering" capability built into DocFx, but I'm wanting full-text search across all of the meta data. Do you have a recommendation for this functionality as well?
To change the location of the docfx output, edit the docfx.json file and specify the dest value. By default it is "dest": "_site". For more formatting guidance, reference: https://dotnet.github.io/docfx/tutorial/docfx.exe_user_manual.html.
Regarding full-text search, that is possible by simply ensuring the ExtractSearchIndex post-processor is invoked (in order to generate an index.json file of keywords) and that the global _enableSearch value is set to true in the docfx.json file. A snippet from that file would look like:
"postProcessors": [ "ExtractSearchIndex" ],
"globalMetadata": {
"_enableSearch": "true"
}
For your first question:
I think what you expect is like the .NET API Browser. The source code behind this page is not open to public, so you need create this page by yourself, through collecting xrefmap.yml from multiple sites, and extract the needed data into this page.
For your second question:
DocFX uses Luna to scan all the output files and generate an index file called index.json for later search use. In your case, you should want to limit the search scope only in the metadata you defined. This is also not supported by DocFX by default. You can also use Luna in your central place to search these meta. You can create your specific index.json for each project first, and the cental place to collect them for the search page.

Create TFS Source Branch using Visual Studio Online / TFS 2015 Api

Does anyone know how to create a branch using the VSO Api. The documentation for Branches doesn't include a "create".
I have been experimenting with doing it via the ChangeSet Api without much success.
This is TFVC, not Git.
Just as what you see in "Branches" page, there isn't any way to create branch with the Rest API. And mostly, you can only read/get the information with the Version Control API for now.
I would recommend you to use Client Object Model Reference if you want to manage the Version Control programmatically. To create a branch, use the "CreateBranch()" method in Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer class.
The REST API apparently does allow one to create branches.
The confusion is that people think that this would be a PUT operation on the Branches endpoint of some kind.
It is not.
In the REST API, a branch is just one more kind of change that is checked in as part of a changeset.
It took me a long time to discover this, myself; and I was using the old SOAP API in the belief, shared by everyone else it appears from what I can find in Q&As on the WWW, that this wasn't part of the REST API.
Of course, using the SOAP API prohibits using .NET 5, because the assemblies only come for .NET Framework.
An abandonware API on an abandonware runtime is not a satisfactory way to talk to source control. ☺
The terrible Azure DevOps documentation gives no clue as to this, except for 1 obscure not-even-a-complete-sentence hidden in a minor class: "List of merge sources in case of rename or branch creation."
The only other clue is what appears in the JSON, from a get changeset changes, that describes the changeset of an already-made branch.
The (also abandoned) Azure DevOps sample code does not contain examples for even deleting an item, let alone branching.
Changesets are checked in via the changeset creation endpoint.
The individual change is a TfvcChange in the changeset's list of changes where:
the version control type (which is a set of flags) contains the branch flag; and
the merge source for the change specifies the source item and the range of changeset numbers.
Branching an entire tree appears to be a matter of branching the directory and all of the files and directories in the directory.
In C♯ or PowerShell, this is a TfvcChange with a VersionControlChangeType of Branch, in a TfvcChangeset passed to TfvcHttpClientBase.CreateChangesetAsync().

How is the Trac Project List page customised?

We've been using Trac for a while now for our developers only. However we are now opening it up for our (internal) clients. We have a project listing page (based on the default one that comes with Trac). What we'd like to do, is display more information about the project than what is currently available.
I have searched google and here, to see if I can find how to get more information. There seems to be a variable called $project which has .name, .description and .href as attributes.
Is there somewhere, a list of the attributes available? Or perhaps a different solution altogether that will allow us to display more information on the project list page. Such as the number of open tickets etc.
As far as I known, you can use $project.env as well. It is an object, which provides a number of attributes:
$project.env.base_url
$project.env.base_url_for_redirect
$project.env.secure_cookies
$project.env.project_name
$project.env.project_description
$project.env.project_url
$project.env.project_admin
$project.env.project_admin_trac_url
$project.env.project_footer
$project.env.project_icon
$project.env.log_type
$project.env.log_file
$project.env.log_level
$project.env.log_format
More detail is available at env.py
On the project page customization page there is not much variables, indeed. Looking at the source code there is also trac.version, trac.time, but that's all. There is also project.env that may hold more information. I do not have a multiproject setup at hand, so you might be interested to see for yourself what variables are available with TracDeveloper plugin. It dumps variables if enabled and you add debug=true in the URL.