Skip to content

Conversation

@RWParsons
Copy link

This PR addresses closes #56

The changes address the requested improvements to Recent changes.R:

Improvements included:

  • Restructured code into functions which are in ./weblate/R/
  • The translated_data and mark_data are derived using two phases: (1) fetch the content from the API, and (2) extract and wrangle the data.
  • Loops have been avoided.
  • match() has been used where applicable.
  • stringr dependency has been avoided

RWParsons and others added 26 commits November 21, 2025 10:20
- replaces code getting handle and fetching responses with function calls
- calculate number of pages from initial endpoint response -- calcluate_n_pages()
- fetch response content for each page and append to list -- fetch_pages_content()
remove duplicated ###Marked for edit section code
replace edit_url fetch with fetch_response_as_json code
replace for loop over edit_url pages with a do.call statement
Merge remote-tracking branch 'origin/refactor-recent-stats' into refactor-recent-stats

# Conflicts:
#	weblate/Recent Changes/Recent changes.R
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

Successfully merging this pull request may close these issues.

Refactor code to obtain recent statistics from Weblate API

3 participants